window.prompt
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<script language="JavaScript">
var month = window.prompt("输出月份","");
document.write(month);
var day = 0;
switch(month){
case "1":
case "3":
case "5":
case "7":
case "8":
case "10":
case "12":
day = 31;
break;
case "4"
case "6":
case "9":
case "11":
day = 30;
break;
case "2":
var year = window.prompt("输入年份","");
if(year%4==0&&year%100!==0||year%400==0){
day=29;
}else{
day=28;
}
break;
default:
break;
}
document.write("月份总数是"+day);
</script>
</body>
</html>
body裏面的是我在視頻對著寫的代碼,視頻中有效果出來,而我對著寫卻沒有,請問是什麼原因
除了body裏面的其他的都是用Adobe Dreamweaver CS3自動生成的