<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Import Namespace="System.Globalization" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body >
<form id="form1" runat="server">
<div>
<TABLE id="Table2" style="Z-INDEX: 102; LEFT: 0px; POSITION: absolute; TOP: 0px" height="200"
cellSpacing="0" cellPadding="0" width="250" border="0" background="image/daojishi.jpg">
<TR>
<TD height="150"><FONT face="宋体"></FONT></TD>
</TR>
<TR>
<TD align="center" style="height: 50px">
<TABLE id="Table1" height="20" cellSpacing="0" cellPadding="0" width="250" border="0" align="center">
<TR>
<TD align="center" height="20"><SPAN id="position2"></SPAN></TD>
</TR>
<TR>
<TD align="center"><SPAN id="position"></SPAN></TD>
</TR>
</TABLE>
<input id="Hidden1" runat="server" type="hidden" />
<asp:Button ID="Button2" runat="server" Text="Button" />
<input id="Text1" type="text" /></TD>
</TR>
</TABLE>
</div>
<span id="Clockstr" style="font-weight: bold;"></span>
<script language="javascript">
<!--
var ServerDate = new Date(<% =DateTime.Now.Year.ToString()+","+DateTime.Now.Month.ToString("00")+","+DateTime.Now.Day.ToString("00")+","+DateTime.Now.Hour.ToString("00")+","+DateTime.Now.Minute.ToString("00")+","+DateTime.Now.Second.ToString("00") %>);
var ClientDate= new Date();
var d=ClientDate-ServerDate;//计算S和C之间的时差,单位毫秒
var starttime = new Date(2007,7,17,15,30,0);//开始时间
var stoptime = new Date(2009,11,3,24,0,0);//结束时间
function clock()
{
var today = new Date();
today.setTime(today.getTime()-d);//同步日期到服务器时间
var leave=starttime-today;
if(leave>=1000)
{
var timeString="";
var day = Math.floor(leave / (1000 * 60 * 60 * 24));
leave-=day*(1000 * 60 * 60 * 24);
if(day>0)timeString+=day + "天"
var hour = Math.floor(leave / (1000 * 60 * 60));
leave-=hour*(1000 * 60 * 60);
if(hour>0)
{
if(timeString!="")timeString+=",";
timeString+=hour + "小时"
}
var minute = Math.floor(leave / (1000 * 60));
leave-=minute*(1000 * 60);
if(minute>0)
{
if(timeString!="")timeString+=",";
timeString+=minute + "分"
}
var second = Math.floor(leave / 1000);
if(timeString!="")timeString+=",";
timeString+=second + "秒"
document.getElementById("Clockstr").innerHTML = "剩余时间:" + timeString;
}
else
{
if((stoptime-today)>0)
{
document.getElementById("Button2").style.display="none";
document.getElementById("Clockstr").innerHTML = "本次补报志愿已结束!";
// document.getElementById("starttab").style.display="";
}
//if((stoptime-today)>0)window.location="sxz.html";
}
setTimeout("clock()", 1000);
}
clock();
//-->
</script>
</form>
</body>
</html>