js利用控制台查错
举个例子
网页源代码如下
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form action="#" id="calculator">
<h2>Find the area of a wall:</h2>
<input type="text" name="width" id="width" placeholder="width" />
</form>
<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
var x=30;
console.log(x*y);
</script>
</body>
</html>
之后打开控制台,如图所示
如下图