【发布时间】:2008-10-07 14:48:13
【问题描述】:
我正在尝试修复我继承的产品中的一些错误,并且我有这个 javascript 的 sn-p 应该突出显示几个框并弹出一个确认框。目前发生的情况是我看到这些框改变了颜色并且有 5 秒左右的延迟,然后就好像丢失的确认只是接受了自己。有没有比我更聪明的人看到这段代码有什么问题?
function lastCheckInv() {
document.getElementById("ctl00$ContentPlaceHolderMain$INDet$txtInvNumber").style.background = "yellow";
document.getElementById("ctl00$ContentPlaceHolderMain$INDet$txtInvNumber").focus();
document.getElementById("ctl00_ContentPlaceHolderMain_INDet_AddCharges").style.background = "yellow";
document.getElementById("ctl00_ContentPlaceHolderMain_INDet_lblFreight").style.background = "yellow";
bRetVal = confirm("Are you sure the information associated with this invoice is correct?");
return bRetVal;
}
【问题讨论】:
-
你如何调用 lastCheckInv() ?
-
除了疯狂的元素 id,我认为这与 C#、.net 或 asp.net 无关。
标签: c# .net asp.net javascript