4.1.4.html

来自「《精通AJAX》光盘 要求: JDK1.4.2 以上版本 数据库采用M」· HTML 代码 · 共 44 行

HTML
44
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>

<body>
<script language="JavaScript" type="text/javascript">
<!--
var month=prompt("请输入月份:",1);
month=parseInt(month);	//非必须:将月份转换为数字类型
switch(month){
	case 1:
	case 3:
	case 5:
	case 7:
	case 8:
	case 10:
	case 12:
		alert(month+"月有31天");
		break;
	case 4:
	case 6:
	case 9:
	case 11:
		alert(month+"月有30天");
		break;
	case 2:
		alert(month+"月有28天");
		break;
	default:
		alert("error");
		break;
}
//-->
</script>

</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?