調(diào)試javascript的好方法
1、從微軟網(wǎng)站下載MS Script Debugger并安裝,這是下載地址:
http://download.microsoft.com/download/winscript56/install/1.0a/NT45XP/EN-US/scd10en.exe
2、修改IE的設(shè)置:
IE的選項-->高級,有兩個選項默認是鉤選的:
Disable Script Debugging(Internet Explorer)
Disable Script Debugging(Other)
中文可能是“禁用腳本調(diào)試”,去掉這兩項的鉤選。
3、在需要調(diào)試的地方加上debugger;例如: <script language=Javascript>
..
debugger;
..
</script>
這就是一個斷點,當(dāng)運行到這里的時候就會中斷進入調(diào)試模式:
新聞熱點
疑難解答