<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>获得星期</title>
<script type="text/javascript">
function con(){
var y,m,d;
y= document.getElementById("year").value;
m= document.getElementById("mounth").value-1;
d= document.getElementById("day").value;
var myday=new Date(y,m,d);
var weekday=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
var answer=myday.getDay();
}
function count(){
document.write("你输入的时间应该是"+ weekday[answer]);
}
</script>
</head>
<body>
<form>
<input type="text" name="年" id="year" >请输入您想获得的年份</input>
<input type="text" name="年" id="mounth" >请输入您想获得的月份</input>
<input type="text" name="年" id="day" >请输入您想获得的日期</input>
<input type="button" name="年" id="click" onclick="count()" value="点击确认"/>
</form>
</body>
</html>
display_none
weibo_Highness学
恋欲兰渊
相关分类