JS debugger 调试

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>JS debugger调试</title>
</head>
<body>
<script type="text/javascript">
//可以将 debugger 语句放在过程的任何地方以中止执行。  使用 debugger 语句类似于在代码中设置断点。  
//debugger 语句中止执行,但它不关闭任何文件或清除任何变量。
for(i = 1; i<5; i++) {
	document.write(i);
	debugger;
}
</script>
</body>
</html>

  

参考链接:http://www.w3cschool.cn/javascript/js-debugging.html

效果图:

 

猜你喜欢

转载自onestopweb.iteye.com/blog/2365442