The user may click, an error occurs when the webpage is not fully loaded.

xiaoxiao2021-03-05  25

When the speed is slow, the user may not completely load the webpage, click, an error

Colleagues' solution:

Var arrobj = new array (); var timerid;

Function addevent () {// Add an event document.attachevent ('onmouseover', setmouseover);

Addevent ();

Function setOVer () {// add a method to each item var obj = event.srcelement; arrobj [arrobj.length] = obj.attachevent ('onclick', setvoid);}

Function init () {// Test load finished? Var State = Document.ReadyState; if (state == "Complete") {WINDOW.CLARINTERVAL (TIMERID); clearance ();}}

Function ClearEvent () {// Clear method Document.detachevent ('onmouseover', setmouseover); for (i = 0; i

Timerid = Window.setInterval ("INIT ()", 100);

转载请注明原文地址:https://www.9cbs.com/read-34899.html

New Post(0)