Getting an Error Code: 0 in only IE for javascript file

天涯浪子 提交于 2020-01-06 14:45:23

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!