SOURCE

console 命令行工具 X clear

                    
>
console
document.write("welcome to JS ");
function callAlert(){
alert('我被点击了一下');
}
<!DOCTYPE html> 
<!-- 不用引入,系统已经自动引入 -->
<html>
<head>
<meta charset="utf-8" />
<title></title>
<!-- <script>
function callAlert(){
alert('我被点了一下');
}
</script> -->
<!--1、在head中引入-->
</head>
<body>
<button onclick="alert('我被点击了')">点击我</button>
<!-- <button onclick="alert('我被点了一下')">点我一下</button> -->
<button onclick="callAlert()">点我一下</button>
<!--2、在body中引入-->
<!-- <script>
//alert("Hi!");
</script> -->
</body>
</html>