其实做这个的原理是很简单的,只是我们当时没有仔细的去想想该怎么实现,我这里用的是xmlhttp来实现的,当然还有其它的办法,我就不多说了。
现在看论坛上很多都是要一些“完整的代码”,看了之后真的是....汗-_-!
a.html
复制代码 代码如下:<?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 == "2006-6-23 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.asp
复制代码 代码如下:<%
call main()
Function main()
response.write(now())
End Function
%>
现在看论坛上很多都是要一些“完整的代码”,看了之后真的是....汗-_-!
a.html
复制代码 代码如下:<?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 == "2006-6-23 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.asp
复制代码 代码如下:<%
call main()
Function main()
response.write(now())
End Function
%>
标签:
ASP是否可以定时触发事件
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“ASP是否可以定时触发事件”评论...