求助 一小段vbs代码

dawn06 2003-07-03 05:44:26
public n,num,ref
n=0
num="1"
ref=1

sub init
on error resume next

parent.window.focus
setinterval "receive",15000
setinterval "flesh",150000
setinterval "if ref=0 then flesh",1200000
if "guest"="guest" then window.open "welcome.asp","","toolbar=no,width=340,height=200"
end sub

sub receive
on error resume next
if document.forms(0).reftm.value="1" then
document.forms(0).refmenu.value="0"
n=n+1
parent.app13_ft1.window.location="reflesh.asp?n="&n
end if
end sub

sub flesh
on error resume next
if num<>document.forms(0).online_num.value and document.forms(0).refmenu.value="1" then
ref=1
num=document.forms(0).online_num.value
if document.agent.document.forms(0).msgnum.value="0" then document.agent.window.location.reload
if document.friend.document.forms(0).msgnum.value="0" then document.friend.window.location.reload
if document.ollist.document.forms(0).msgnum.value="0" then
document.forms(0).reftm.value="0"
document.ollist.window.location.reload
end if
else
ref=0
end if
end sub

setinterval 是什么意思,搜索也没有
...全文
35 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
超级大笨狼 2003-09-20
  • 打赏
  • 举报
回复

Contents Index Topic Contents

Previous Topic: setEndPoint
Next Topic: setTimeout


setInterval

--------------------------------------------------------------------------------

Description

Repeatedly evaluates an expression after a specified number of milliseconds has elapsed.

Syntax
intervalID = object.setInterval(expression, msec [, language])



Parameter Description
expression String containing the script code to execute each time the interval elapses.
msec Integer value or numeric string specifying the length of the interval, in milliseconds.
language Optional. String specifying the language in which the code is executed.

Return Value

Returns an integer identifier representing the interval. Use this identifier to clear (stop) the interval.

Example

The following example sets a 5-second interval. Each time the interval elapses, the background color of the document changes.

setInterval("changeColor()", 5000);
.
.
.
function changeColor()
{
if (document.body.bgColor == "#ff0000") // Check if body bgColor is red by comparing to hexidecimal value
document.body.bgColor = "blue";
else
document.body.bgColor = "red";
}

Applies To

window

See Also
clearInterval



--------------------------------------------------------------------------------

Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
tqinghaijn 2003-07-03
  • 打赏
  • 举报
回复
Parameters

vCode Required. Variant that specifies a function pointer or string that indicates the code to be executed when the specified interval has elapsed.
iMilliSeconds Required. Integer爐hat specifies the number of milliseconds.
sLanguage Optional. String爐hat specifies any one of the possible values for the LANGUAGE attribute.

Return Value

Integer. Returns an identifier that cancels the timer with the clearInterval method.

tqinghaijn 2003-07-03
  • 打赏
  • 举报
回复
Evaluates an expression each time a specified number of milliseconds has elapsed.

setInterval(vCode, iMilliSeconds [, sLanguage])
wsmall 2003-07-03
  • 打赏
  • 举报
回复
应该是设置参数

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧