I didn't see any error message in firebug. When I opened IE, I encountered a damn "not yet implemented error". I searched according to the location prompted in IE and found no errors. It seems that IE's error location is not very accurate. In desperation, I searched on Google and finally found the error. It turns out that the error is that window.onload= myFunc(var1,var2); IE’s window.onload function does not support parameter calling. Although the function will still be executed, an error will occur, which will affect the continued execution of subsequent scripts. The following are two simple A useful solution:
Write another function, such as
function loadFunc(){
myFunc(var1,var2)
},
Then
window.onload = loadFunc;
Use anonymous functions.
onload =function(){myFunc(var1,var2)}
That’s enough, just these two methods.