当前位置: 首页 > 图文教程 > 网络编程 > Javascript > javascript脚本调试方法小结

Javascript
form中限制文本字节数js代码
use jscript with List Proxy Server Information
use jscript List Installed Software
List Installed Software Features
List Information About the Binary Files Used by an Application
List the Codec Files on a Computer
List the UTC Time on a Computer
List Installed Hot Fixes
excel操作之Add Data to a Spreadsheet Cell
Add Formatted Data to a Spreadsheet
Apply an AutoFormat to an Excel Spreadsheet
JavaScript语法着色引擎(demo及打包文件下载)
类之Prototype.js学习
一款JavaScript压缩工具:X2JSCompactor
iis6+javascript Add an Extension File
jscript之Open an Excel Spreadsheet
jscript之Read an Excel Spreadsheet
jscript之List Excel Color Values
去除图像或链接黑眼圈的两种方法总结
Add a Formatted Table to a Word Document

Javascript 中的 javascript脚本调试方法小结


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

相信大家试过编写javascript脚本时发生这样或那样的错误,但是js并没有很好的调试方法,在这里介绍两个方法。 1、 alert方法
这也是十分原始的方法,但调试起来十分麻烦。
2、 debugger方法
首先打开Internet选项——高级,将“禁用脚本调试(Internet Explorer)”的勾去掉
如果想其他浏览器也启用调试,那么可以把“禁用脚本调试(其他)”的勾也去去掉。
然后在你想需要地方进行调试,就加入debugger,如
<script type="text/javascript">
debugger;
var s="debugger可调试";
alert(s);
</script>
用ie打开该页面,就会出现自动调用VS2005进行调试.
点击是,像平时一样按F10或F11就可以进行调试了