SOURCE

console 命令行工具 X clear

                    
>
console
document.write("welcom to my website");

function callAlert(){
    alert('我被点击一下');
}
        window.onload = function () {
            alert("欢迎光临萌萌小店!");
        }
        window.onbeforeunload = function (event) {
            var e = event || window.event;
            e.returnValue = "记得下来再来喔!";
        }
<!DOCTYPE html> 
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <!--script>
            function callAlert(){
        alert('我被点击一下');
    }
    </script-->

</head
<body>
    <button onclick="alert=('我被点击')">点我</button>
    <button onclick="callAlert()">点我一下 </button>
    <script>
        //alert("Hi!")
    </script>

</body>
</html>