javascript-词法分析解析

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style>
    #main{
        background-color: red;
        width:300px;
        height:400px;
    }
    #content{
        background-color: pink;
        width:150px;
        height:200px;
    }
</style>
<body>


    <script>
          function t1(){
              console.log(name);
              var name = "alex";
          }
          t1();
//        function t1(age){
//            console.log(age); // function age()
//            var age = 27;
//            console.log(age); // 27
//            function age(){}
//            console.log(age); // 27
//        }
//
//        t1(3);


    </script>


</body>
</html>

posted on 2017-10-01 16:37  shisanjun  阅读(141)  评论(0编辑  收藏  举报

导航