<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>新网页1</title>
<style type="text/css">
<!--
body { font-size: 11 pt;    		
	font-family: 新细明体, 细明体, Mingli, Verdana, Arial, Helvetica  }
-->
</style>
</head>
<body onload="startclock()" background="../../images/winback.gif" onload="GetClientDateTime()">
<blockquote>         
<p>本范例文件名称：RunServer.asp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 目的：在ASP文件中使用在前后台程序</p>                
<%
	Response.Write "<p>Server端的目前日期及时间为" & Now() & "</p>"           
%>
<form name="Show">            
<p>Client端的目前日期及时间为<input type="text" name="T1" size="20" style="font-size: 12pt"></p>            
</blockquote>            
</form>            
</body>            
<script language="JavaScript">           
<!--            
var timerID = null           
var timerRunning = false           
           
function stopclock(){           
// cannot directly test timerID on DEC OSF/1 in beta 4.           
if(timerRunning)           
clearTimeout(timerID)           
timerRunning = false           
}           
function startclock(){           
// Make sure the clock is stopped           
stopclock()           
showtime()           
}           
function showtime(){           
var now = new Date()           
var hours = now.getHours()           
var minutes = now.getMinutes()           
var seconds = now.getSeconds()           
var timeValue = "" + ((hours > 12) ? hours - 12 : hours)           
timeValue += ((minutes < 10) ? ":0" : ":") + minutes           
timeValue += ((seconds < 10) ? ":0" : ":") + seconds           
timeValue += (hours >= 12) ? " P.M" : " A.M"
var n=now.getMonth() + 1
var m=now.getFullYear() + "/" + n + "/" + now.getDate()
document.Show.T1.value = m + " " + timeValue
timerID = setTimeout("showtime()",1000)           
timerRunning = true           
}           
//-->           
</script>           
</html>            
