<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>倒计时 页面</title>
<script type="text/javascript">
//document.write("");
function show_date_time() {
//alert('') ;
window.setTimeout("show_date_time()", 1000);
BirthDay = new Date("9/06/2013 08:30:00");//这个日期是可以修改的
today = new Date();
timeold = (BirthDay.getTime() - today.getTime());
sectimeold = timeold / 1000
secondsold = Math.floor(sectimeold);
msPerDay = 24 * 60 * 60 * 1000
e_daysold = timeold / msPerDay
daysold = Math.floor(e_daysold);
e_hrsold = (e_daysold - daysold) * 24;
hrsold = Math.floor(e_hrsold);
e_minsold = (e_hrsold - hrsold) * 60;
minsold = Math.floor((e_hrsold - hrsold) * 60);
seconds = Math.floor((e_minsold - minsold) * 60);
document.getElementById("span_dt_dt").innerHTML = "<font color='green' align='center' size='8'>"
+ daysold
+ '天'
+ hrsold
+ '小时'
+ minsold
+ '分'
+ seconds
+ '秒'
+ "</font>";
//<align=center> <font color="#0000ff">"+daysold+"天"+hrsold+"小时"+minsold+"分"+seconds+"秒"+"<br></font>
}
show_date_time();
</script>
</head>
<body οnlοad="show_date_time();">
<div>
<font size="5" face="宋体" color="#0000ff">距离2013年高考开始还有:</font>
<span id="span_dt_dt"></span>
</div>
</body>
</html>