index.htm 
-----------
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head><body>
<input type=button onclick="showServerTime()" value="serverTime"><script language="javascript">
<!--
function showServerTime()
{
var oHttp = new ActiveXObject("Microsoft.XMLHTTP");
oHttp.open("POST","Default.asp",false);
oHttp.send();
alert(oHttp.responseText);
}
//-->
</script>
</body></html>getTime.asp
------------------
<%
Response.write Now()
%>

解决方案 »

  1.   

    应该调用服务器时间,因为客户籍可能时间有误,
    服务器有数据库吧,如oracle,实现:rs=stmt.executeQuery("select to_char(sysdate,'yyyymmddHH24MISS"); 
    string date=rs.getString(1);
    <%=date%>
      

  2.   

    你在服务器端执行的话,就是服务器端的时间.<script runat=server language=javascript> 
    var a = new Date() 
    a = a.getFullYear() + "-" + (a.getMonth() +1) + "-"+a.getDate() + " "+a.getHours() + ":"+a.getMinutes() 
    Response.Write(a) 
    </script>