<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>单击事件 </title>
<script type="text/javascript">
function wwt() {
var a = document.getElementById("n1").value;
var b = document.getElementById("n2").value;
var c = document.getElementById("n3").value;
var tadays = new Date(a,b,c);
var weekns = ["星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"];
document.write(weekns[tadays.getDay()]);
}
</script>
</head>
<body>
<form>
<input type="text" id="n1" />年<br />
<input type="text" id="n2" />月<br />
<input type="text" id="n3" />日<br />
<input name="点击我" onClick="wwt()" type="button" value="查询"/>
</form>
</body>
</html>