1112整理
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <title>无标题文档</title> 6 7 <script type="text/javascript" src="test.js"></script> 8 9 <script language="javascript" type="text/javascript"> 10 11 alert("大家好!"); 12 13 </script> 14 </head> 15 16 <body> 17 <script language="javascript" type="text/javascript"> 18 19 alert("大家上午好!"); 20 21 var m="abc"; 22 23 m=123; 24 25 alert("m="+m); 26 27 var $n=1, a=true, b=false; 28 29 a&=b; 30 31 alert("a="+a); 32 33 if (isNaN("123.123")) 34 { 35 alert("不是数字"); 36 } 37 else 38 { 39 alert("是数字"); 40 } 41 42 var n; 43 switch(n) 44 { 45 case 1: 46 47 alert("n=1"); 48 49 break; 50 51 default: 52 53 alert("都不对") 54 55 break; 56 } 57 58 for(var i=0;i<10;i++) 59 { 60 alert("i="+i); 61 } 62 63 </script> 64 65 <input type="button" onclick="test.js" value="提示"> 66 </body> 67 </html>