<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <script type="text/javascript" src="web/20151112/test.js"> </script> <script language="javascript" type="text/javascript"> alert("你好!"); </script> </head> <body> <script language="javascript" type="text/javascript"> alert("上午好"); for(var i = 0; i < 9 ; i++) { alert("i = " + i ); } var m,n = ‘1‘; alert(m); if(isNaN("13458a")) { alert("不是数字") } else { alert("是数字") } switch(n) { case 1: alert("n = 1"); break; default: alert("都不匹配") break; } </script> <input type="button" onclick="javascript: alert(‘提示\n一下‘)" value="提示" /> </body> </html>
时间: 2024-10-11 22:52:45