--------------------------保存为任意的htm,html文件------------- <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- function refreshTime() { var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP") xmlHttp.open("GET", "getnow.asp", false) xmlHttp.send() var re=xmlHttp.responseText; window.dt.innerText=re; setTimeout('refreshTime()',900); } //--> </SCRIPT> <BODY οnlοad="refreshTime()"> <div id=dt></div> </BODY> </HTML> =================================================================================getnow.asp,里面只有一句获取服务器时间的语句,和html文件放在同一虚拟目录下 getnow.asp: <%=now()%>
xmlhttp自动刷新自动取得服务器时间的时钟
最新推荐文章于 2022-07-04 11:56:41 发布