<title>无标题文档</title> <script src="脚本2.js"></script> </head> <body>123<br /> <input type="button" value="请点击" onclick="hello()"/> <script> var a=prompt("输入数字",""); var b=isNaN(a); alert(b) </script> </body> <p id="hello">hello</p><br /> </html> <script type="text/javascript" language="javascript"> /*alert("页面加载完成")*/ /*confirm("页面加载完成")*/ /*prompt("页面加载完成","请输入100以内的整数")*/ var a=1; var b="3.14"; var c=3.14; var d=true; var f=b.parseInt; /*var w=new Array(); w[0]=1; w[1]="hehe";*/ /*function add(){}*/ /*document.write("你好")*/ function hello(){ var x=document.getElementById("hello"); x.style.color="red"; } /*var student{ name:"张三"; sex:"男"; }*/ var z=window.close(); <input type="button" value="请点击" onclick="z()"/> </script>