您的位置:首页 > 其它

特定时间执行某程序

2004-10-02 04:44 309 查看
方法一:用windows的计划任务
比如想执行asp网页的地址为http://localhost/nncc2new/refresh.asp

'保存如下代码为do.vbs,在计划任务里执行do.vbs

Dim IE
Set IE = CreateObject("InternetExplorer.Application")

'运行你的asp文件

ie.navigate("http://localhost/nncc2new/refresh.asp")

ie.visible=1 '如果想使运行的网页不可见,就设为0

'Clean up...
Set IE = Nothing

方法二:在客户端代码用settimout模拟一个时钟

<script language="javascript">
<!--
function window.onload()
{
show();
}

function show()
{
t1.value=new Date();
if (t1.value=某时刻)
window.open('http://localhost/nncc2new/refresh.asp');
window.setTimeout('show()',1000);
}
</script>

<input name=t1 size=20> '可隐藏
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: