JavaScript是一种运行在浏览器中的解释型的编程语言。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html>
<html>

<head>
    <script src="foo.js"></script>
    <script type="text/javascript">
        console.log('javascript0')
        var myVar = "hello";
        function showAlert() { alert('You triggered an alert!'); }
    </script>
</head>

<body>
    body0
    <button>
</body>

</html>