ASP是否可以定時(shí)觸發(fā)事件
更新時(shí)間:2007年01月09日 00:00:00 作者:
其實(shí)做這個(gè)的原理是很簡單的,只是我們當(dāng)時(shí)沒有仔細(xì)的去想想該怎么實(shí)現(xiàn),我這里用的是xmlhttp來實(shí)現(xiàn)的,當(dāng)然還有其它的辦法,我就不多說了。
現(xiàn)在看論壇上很多都是要一些“完整的代碼”,看了之后真的是....汗-_-!
a.html
now.asp
現(xiàn)在看論壇上很多都是要一些“完整的代碼”,看了之后真的是....汗-_-!
a.html
復(fù)制代碼 代碼如下:
<?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>
<!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
復(fù)制代碼 代碼如下:
<%
call main()
Function main()
response.write(now())
End Function
%>
call main()
Function main()
response.write(now())
End Function
%>
相關(guān)文章
asp實(shí)現(xiàn)帶刷新功能的驗(yàn)證碼代碼
本文給大家分享的是一段使用asp實(shí)現(xiàn)的驗(yàn)證碼功能,而且是帶刷新的,代碼非常簡潔,非常實(shí)用,有需要的小伙伴可以參考下。2015-05-05談動(dòng)態(tài)多行多列,循環(huán)行和列,輸出M行N列的ASP代碼
2008-03-03msxml3.dll 錯(cuò)誤 800c0019 系統(tǒng)錯(cuò)誤:-2146697191解決方法
今天發(fā)現(xiàn)一個(gè)asp后臺(tái)使用了XMLHTTP組件的頁面無法無法生成靜態(tài)頁面了,運(yùn)行時(shí)提示msxml3.dll 錯(cuò)誤 800c0019 系統(tǒng)錯(cuò)誤:-2146697191,經(jīng)過搜索如下方法解決了問題2020-11-11ASP中實(shí)現(xiàn)定時(shí)發(fā)送郵件的代碼分享
這篇文章主要介紹了ASP中實(shí)現(xiàn)定時(shí)發(fā)送郵件的代碼分享,使用VBS的方式實(shí)現(xiàn),并運(yùn)行在數(shù)據(jù)庫中,需要的朋友可以參考下2014-07-07ASP Cookies操作的詳細(xì)介紹與實(shí)例代碼
Request和Response對(duì)象都有一組Cookie。Request.cookie集合是一系列Cookie,從客戶端與HTTP Request一起發(fā)送到Web服務(wù)器。反過來,如果你希望把Cookie發(fā)送到客戶機(jī),就可以使用Response.cookie。2010-03-03