내가 상속 한 제품의 버그를 수정하려고하는데, 자바 스크립트 스 니펫이 있습니다.이 스 니펫은 두 개의 상자를 표시하고 확인 상자를 팝업합니다. 현재 발생하는 현상은 상자의 색상이 바뀌고 5 초 정도의 지연이있는 것을 볼 수 있습니다. 누락 된 확인 내용이 그대로 적용됩니다. 아무도 내가이 코드에서 불평하는 것을 보는 것보다 더 똑똑한가? 확인하기 전에 라인 중 하나가 예외를 던지고 당신은 결코 실제로 확인에 도착하지한다면 내가 생각할 수있는왜이 JavaScript는 확인 상자를 표시하지 않습니까?
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;
}
미친 요소 ID 이외에, 나는 이것이 C#, .net 또는 asp.net과 아무 관련이 없다고 생각하지 않습니다. – Neall
어떻게 lastCheckInv()를 호출합니까? – leppie