亲爱的伙计们,Closure Compiler 在高级模式下给出了这个警告,下划线{this.
JSC_USED_GLOBAL_THIS:在第 200 行字符 33 处危险地使用全局 this 对象
hovers[i4].onfocus = function() {this.className += "Hovered";}
JSC_USED_GLOBAL_THIS:在第 201 行字符 32 处危险地使用全局 this 对象
hovers[i4].onblur = function() {this.className = this.className.replace(/Hove...
JSC_USED_GLOBAL_THIS:在第 201 行字符 49 处危险地使用全局 this 对象
hovers[i4].onblur = function() {this.className = this.className.replace(/Hove...
JSC_USED_GLOBAL_THIS:在第 218 行字符 38 处危险地使用全局 this 对象
buttons[i5].onmouseover = function() {this.className += "Hovered";}
Q1。这有什么好危险的?
Q2。我应该改变这个吗?
Q3。如何改进/解决此代码?
谢谢!