获取错误代码:0在只有IE的JavaScript文件 [英] Getting an Error Code: 0 in only IE for javascript file
本文介绍了获取错误代码:0在只有IE的JavaScript文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我为我的网站使用Drupal 7.22安装。
Im using a Drupal 7.22 installation for my website.
我在我的一个JS文件的IE中收到一个错误。
I keep getting an error in IE for one of my JS files.
IE状态的错误
Line: 32
Error: Not implemented
这个问题只发生在IE 9及更早版本,只有在Internet Explorer。 Chrome,FireFox,ect工作没有任何问题。
This issue only occurs in IE 9 and older and only in Internet Explorer. Chrome, FireFox, ect work without any problem.
推荐答案
self
是一个全局变量 window
。您不能更改窗口
变量的值。
self
is a global variable an alias for window
. You cannot change the value of the window
variable.
您需要使用 var
,使其成为局部变量:
You need to use var
to make it a local variable:
var self = jQuery(this);
您应该对每个变量使用 var
,您不想开始创建全局变量。
P.S. You should use var
for every variable, you don't want to start creating global variables.
这篇关于获取错误代码:0在只有IE的JavaScript文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文