In fact, the principle of doing this is very simple, but we didn't think carefully about how to implement it at the time. Here I use xmlhttp to implement it. Of course there are other methods, I won't say much about it.
Currently, many of the forums require "complete code". After reading the code, it is actually... Khan -_-!
A.htmlCopy codeThe Code is as follows: <? Xml version = "1.0" encoding = "UTF-8"?>
<! Doctype html public "-// W3C // dtd html 4.01 // EN" "http://www.w3.org/TR/html4/strict.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Title> xmlhttpMission-http://www.never-online.net </title>
<Meta http-equiv = "ImageToolbar" content = "no"/>
<Meta name = "author" content = "BlueDestiny, never-online"/>
<Meta name = "keywords" content = "Mozilla CSS, C #,. net, Refercence, www.never-online.net"/>
<Meta name = "description" content = "BlueDestiny, never-online"/>
<Meta name = "title" content = "Mozilla CSS Refercence And Demo-http://www.never-online.net"/>
<Meta name = "creator. name" content = "Genius Lau, never-online, blueDestiny"/>
<Style type = "text/css" media = "all" title = "Default">
@ Import "main.css ";
</Style>
<Script type = "text/javascript">
// <! [CDATA [
Function mission (){
Var x = new ActiveXObject ("Msxml2.XMLHTTP. 3.0 ");
X. open ("get", "now. asp? T = "+ Math. random (). toFixed (4), false );
X. send ();
Var demo = document. getElementById ("demo ");
Var now = demo. innerHTML = x. responseText;
If (now = "15:42:20 "){
Var wnd = window. open ("http://blog.csdn.net/BlueDestiny ","","");
};
_ X = window. setTimeout (mission, 1000)
}
Onload = mission;
//]>
</Script>
</Head>
<Body id = "www.never-online.net">
<Div id = "demo"> </div>
</Body>
</Html>
Now. aspCopy codeThe Code is as follows: <%
Call main ()
Function main ()
Response. write (now ())
End Function
%>