问题
Im using a Drupal 7.22 installation for my website.
I keep getting an error in IE for one of my JS files.
The error in IE states
Line: 32
Error: Not implemented
This issue only occurs in IE 9 and older and only in Internet Explorer. Chrome, FireFox, ect work without any problem.
回答1:
self is a global variable an alias for window
. You cannot change the value of the window
variable.
You need to use var
to make it a local variable:
var self = jQuery(this);
P.S. You should use var
for every variable, you don't want to start creating global variables.
来源:https://stackoverflow.com/questions/17172546/getting-an-error-code-0-in-only-ie-for-javascript-file