当前位置: 首页 > 图文教程 > 网络编程 > Javascript > javascript 尚未实现错误解决办法

Javascript
Add a Table to a Word Document
Add Formatted Text to a Word Document
用jscript实现新建word文档
用jscript实现新建和保存一个word文档
Open and Print a Word Document
Use Word to Search for Files
Convert Seconds To Hours
Sample script that deletes a SQL Server database
Sample script that displays all of the users in a given SQL Server DB
firefox中用javascript实现鼠标位置的定位
div+css实现鼠标放上去,背景跟图片都会变化。
Locate a File Using a File Open Dialog Box
Save a File Using a File Save Dialog Box
用jscript实现列出安装的软件列表
List the Stored Procedures in a SQL Server database
Display SQL Server Login Mode
Display SQL Server Version Information
List all the Databases on a SQL Server
用jscript启动sqlserver
Stop SQL Server

Javascript 中的 javascript 尚未实现错误解决办法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 258 ::
收藏到网摘: n/a

打开页面的时候,FF下一切正常,但是当我用IE6测试的时候,JS总执行不下去了,提示“尚未实现”,无论怎么搞就搞不定。 在firebug中也没有看到任何错误提示。打开IE就遇到该死的“尚未实现错误”,根据IE中提示的位置找过去也没有发现任何错误,看来IE的报错定位也不太准确。万般无奈之下,google搜索,终于找到了错误所在的地方。原来错误在于window.onload= myFunc(var1,var2);IE的window.onload函数中不支持参数调用,虽然函数会照样执行,但是却会出现报错,影响后续脚本的继续执行,下面是两种简单而有用的解决办法:
再写一个函数,譬如
function loadFunc(){
myFunc(var1,var2)
},
然后
window.onload = loadFunc;
使用匿名函数。
onload =function(){myFunc(var1,var2)}
足够了,就这两种方法。