실제로, 이것을하는 원칙은 매우 간단하지만, 우리는 그 당시 그것을 구현하는 방법에 대해 생각하지 않았습니다. XMLHTTP를 사용하여 구현했습니다. 물론 다른 방법이 있으므로 많이 말하지 않을 것입니다.
이제 많은 포럼에는 "완전한 코드"가 필요합니다. 그것을 읽은 후, 나는 정말로 ... 땀 -_-!
A.html
코드 사본은 다음과 같습니다. <? xmlversion = "1.0"encoding = "utf-8"?>
<! doctypehtmlpublic "-// w3c // dtdhtml4.01 // en" "http://www.w3.org/tr/html4/strict.dtd">
<htmlxmlns = "http://www.w3.org/1999/xhtml">
<헤드>
<title> xmlhttpmission-http : //www.never-online.net </title>
<metahttp-equiv = "imagetoolbar"content = "no"/>
<metaname = "author"content = "BlueDestiny, never-online"/>
<metaname = "keywords"content = "Mozillacss, c#,. net, 참조, www.never-online.net/>
<metaname = "description"content = "BlueDestiny, Never-online"/>
<metaname = "title"content = "MozillacsSreferenceAnddemo-http : //www.never-online.net/>
<metaname = "creator.name"content = "GeniusLau, Never Online, BlueSestiny"/>
<styletype = "text/css"media = "all"title = "default">
@import "main.css";
</스타일>
<scriptType = "Text/JavaScript">
// <! [cdata [
functionmission () {
varx = newActivexObject ( "msxml2.xmlhttp.3.0");
x.open ( "get", "now.asp? t ="+math.random (). tofixed (4), false);
x.send ();
vardemo = document.getElementById ( "데모");
varnow = demo.innerhtml = x.responsetext;
if (지금 == "2006-6-2315 : 42 : 20") {
varwnd = window.open ( "http://blog.csdn.net/bluedestiny", "", "");
};
_X = Window.setTimeout (미션, 1000)
}
onload = 미션;
//]]>
</스크립트>
</head>
<bodyid = "www.never-online.net">
<divid = "데모"> </div>
</body>
</html>
이제 .asp
다음과 같이 코드를 복사하십시오. <%
callmain ()
functionmain ()
response.write (now ())
최종 기능 장애
%>