在Internet Explorer 10中,我具有以下内容:
/*
* Alias document.getElementById(), to reduce typing, improve
* readability and speed up access to the function.
*/
var getElmById = document.getElementById;
function . . . (ctlID) {
var ctrl = getElmById(ctlID); // <————<<< error raised here
. . .
}
这一直很好,但是突然间给了我
SCRIPT65535: Invalid calling object
我已经确定,如果选中复选框,Tools > Compatibility View Settings > [_] Display intranet sites in Compatibility View
则别名函数运行正常,但是如果清除该复选框,则会收到错误消息。
是什么原因?IE响应的具体问题是什么?是否已消除了类似的别名功能?“文档”对象的行为方式是否有所改变?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句