1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8" />
5 <title></title>
6 <script type="text/javascript">
7
8
9 var num = 20;
10
11 //如果num为10,则输出哈哈哈哈哈哈
12 //注意用==,如果是=,则代表赋值,会出现弹窗的,因为num=10是true
13 if(num == 10){
14
15 alert("哈哈哈哈哈哈");
16
17 }
18
19
20 </script>
21 </head>
22 <body>
23
24 </body>
25 </html>