<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d4684235500622716427\x26blogName\x3dCaiwangqin\x27s+blog\x26publishMode\x3dPUBLISH_MODE_HOSTED\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://blog.caiwangqin.com/search\x26blogLocale\x3dzh_CN\x26v\x3d2\x26homepageUrl\x3dhttp://blog.caiwangqin.com/\x26vt\x3d3393395200455623441', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Caiwangqin's blog

Focus on Cloud Service, Smart Hardware, Architecture, Technic and beyond…

Javascript debugging in IE6

2007年4月20日星期五


该死的IE6总是会对在Firefox下执行很好的Javascript报错,而且没有类似Firebug一样优秀的调试工具.而MS Script Debugger,微软要求通过Windows正版验证后,才能下载, 这太不方便了,以下是直接下载地址。


1、从微软网站下载MS Script Debugger并安装,这是下载地址:
http://download.microsoft.com/download/winscript56/install/1.0a/NT45XP/EN-US/scd10en.exe



2、修改IE的设置:
IE的选项–>高级,有两个选项默认是钩选的:
Disable Script Debugging(Internet Explorer)
Disable Script Debugging(Other)
中文可能是“禁用脚本调试”,去掉这两项的钩选。


3、在需要调试的地方加上debugger;例如: <script language=javascript>
..
debugger;
..
</script>
这就是一个断点,当运行到这里的时候就会中断进入调试模式.


标签:

posted by Jesse Cai, 上午5:58

0 Comments:

发表评论

订阅 帖子评论 [Atom]

<< 主页