SOURCE

console 命令行工具 X clear

                    
>
console
document.write("</br>"+"welcome");

function writeDocument(variable)
{
    document.write(variable + "<br/>");


} 
<!DOCTYPE html> 
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    
</head>
<body>
    <script type="text/javascript">
        document.write("Heather1"+"<br/>");
        function callAlert(){
            alert("Welcome2");
        }
        window.onload = function (){ 
            alert("欢迎光临萌萌小店!");}

         window.onbeforeunload = function (event){ 
             var e=eventwindow.event: 
            e.returnValue ="记得下来再来喔!";}
    </script>
    <button onclick="alert('Welcome1')">点击1</button>
    <button onclick="callAlert()">点击2</button>
</body>
</html>