Whether the ASP can trigger events by timing _ Application Tips

Source: Internet
Author: User
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
%>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.