We often encounter this situation, there is no problem on a computer on a computer, and will report the error in another computer. This is because we are generally because we trigger an event. This JS code has not been loaded, causing this property that cannot be found. This situation we generally handle the JS code in front, if the control (such as button) is loaded before loading, this JS code has been loaded, but sometimes JS code due to some The reason has to be written below, there is no way to ensure that when we trigger an event, this JS code is fully loaded. The best way is to write these events in a function, and then call this function while triggering OnLoad. ,as follows:
Function initObject ()
{
Document.all ("nextstep"). Attachevent ("Onclick", NextPAper;
}
Window.attachevent ("OnLoad", InitObject);
script>
Here, there is only one next button on the next button, this event triggered NextPAper function, this sentence: window.attachevent ("OnLoad", InitObject); Meaning, my web triggered online, INITOBJECT, only to guarantee The web page is initialized before loading.
Ayuan
9CBS certified blog expert
Blog expert
Huawei old employees
Big Data
More than ten years, in Huawei, Internet Corporation's experience, profound understanding and practical experience in CRM, big data, mainly sharing various project experience, including architecture, Java, big data and other articles