兼容低版本IE的JScript5.5实现

2019-06-03 19:56:45王旭
< 5) return null; @else var e = new Error(-2146823260, "Array or arguments object expected"); e.name = "TypeError"; e.message = e.description; throw(e); @end } for (var i = 0; i < p.length; i++) { ps[i] = 'p[' + i + ']'; } } if ((typeof(o) == "object") || (typeof(o) == "function")) { o.__$$apply$$__ = this; var returnValue = eval('o.__$$apply$$__(' + ps.join(', ') + ');'); o.__$$apply$$__ = null; return returnValue; } else { this.__$$apply$$__ = this; var returnValue = eval('this.__$$apply$$__(' + ps.join(', ') + ');'); this.__$$apply$$__ = null; return returnValue; } } Function.prototype.call = function (o) { var ps = []; if (typeof(o) == "undefined") { var __$$call$$__ = this; return eval('__$$call$$__(' + ps.join(', ') + ');'); } if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { ps[i - 1] = 'arguments[' + i + ']'; } } if ((typeof(o) == "object") || (typeof(o) == "function")) { o.__$$call$$__ = this; var returnValue = eval('o.__$$call$$__(' + ps.join(', ') + ');'); o.__$$call$$__ = null; return returnValue; } else { this.__$$call$$__ = this; var returnValue = eval('this.__$$call$$__(' + ps.join(', ') + ');'); this.__$$call$$__ = null; return returnValue; } } @end @*/
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
如果你想测试低版本的 IE 浏览器上的效果,又没有安装低版本的 IE 浏览器,可以使用这个包:ie_all.zip 。这里面都是不需要安装的 IE,直接释放压缩包到一个目录下,就可以运行了。如果你是 win9x 系统,可以到 这里 下载 win9x 版的 standalone IE。