四种调试方式

一 概念

- alert()
- console.log()
- document.write()
- 浏览器断点调试

二 代码示范

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>四种调试方式</title>
</head>
<body>
四种调试方式
</body>
<script type="text/javascript">
var a = 10;
var b = 20;

// 四种查看变量的值的方式
// alert(a);
// alert(b);

// console.log(a);
// console.log(b);

// document.write(a);
// document.write(b);

// 断点调试
</script>
</html>

posted @ 2018-10-11 15:59  不沉之月  阅读(212)  评论(0编辑  收藏  举报