日期:2014-05-17  浏览次数:20576 次

Html button按钮的实现 还实现了日期的显示
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script>
function showTime(){
var time=new Date();
alert(time.getYear()+"-"+eval(time.getMonth()+1)+"-"+time.getDate());

}

</script>

</head>
<body>
<input type="button" name="ok" value="当前日期" onclick="showTime();"/>
</body>
</html>