2008年10月15日

使用Firebug的console导致IE提示对象未定义错误

1.安装Firebug Lite
具体安装方法查看Firebug Lite的主页
http://getfirebug.com/lite.html

2.添加一段javascript到页面中
if (!window.console || !console.firebug)

{
    var names 
= ["log""debug""info""warn""error""assert""dir""dirxml",
    
"group""groupEnd""time""timeEnd""count""trace""profile""profileEnd"];

    window.console 
= {};
    
for (var i = 0; i < names.length; ++i)
        window.console[names[i]] 
= function() {}
}

或直接下载firebugx.js
http://getfirebug.com/firebug/firebugx.js


posted @ 2008-10-15 14:36 Gordian Yuan 阅读(7869) | 评论 (3)编辑 收藏

<2008年10月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

导航

统计

常用链接

留言簿(1)

随笔档案

文章档案

搜索

最新评论

阅读排行榜

评论排行榜