本文介绍在谷歌浏览器调试JavaScript的方法。
新建test.html文件,写入:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript">
alert("Hello World!");
document.write("Hello World")
var vAlert={};
vAlert.show=function(msg){
alert(msg);
}
var test_var = 'test world'
vAlert.show("测试");
console.log('Hello World')
console.log(test_var)
</script>
</body>
</html>

