In fact, the principle of doing this is very simple, but we did not carefully to think how to achieve, I use here is XMLHTTP to achieve, of course, there are other ways, I will not say more.
Now look at a lot of forums are to have some "complete code", after looking at really .... Khan-_-!
A.html
Copy Code code 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" >
<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 = = "2006-6-23 15:42:20") {
var wnd = window.open ("Http://blog.csdn.net/BlueDestiny", "", "");
};
_x = Window.settimeout (mission,1000)
}
onload = Mission;
]]>
</script>
<body id= "Www.never-online.net" >
<div id= "Demo" ></div>
</body>
Now.asp
Copy Code code as follows:
<%
Call Main ()
Function Main ()
Response.Write (now ())
End Function
%>