VBS的setTimeout????

sdts 2004-11-16 09:55:14
setTimeout在VBScript里怎么用不了阿?
<script language="VBScript">
<!--
Function nowtime()
ntime=Time()
str2 = Hour(ntime)&"时" & Minute(ntime) & "分" & Second(ntime) & "秒"
nntime.innerTEXT=str2
setTimeout("nowtime()",1000)
END Function

nowtime()
-->
</script>

就是动态的数字时钟 不起作用阿 是setTimeout的问题
...全文
218 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
sdts 2004-11-16
  • 打赏
  • 举报
回复
还是谢谢大家关注 结贴了
zandx2004 2004-11-16
  • 打赏
  • 举报
回复
明白些
itzhiren 2004-11-16
  • 打赏
  • 举报
回复
学习
heyixiang 2004-11-16
  • 打赏
  • 举报
回复
偶要虚心学习,不怕丢脸。

meizz 2004-11-16
  • 打赏
  • 举报
回复
setTimeout 是DHTML里的方法, JavaScript可以调用它, VBScript 同样也可以调用它
jnhfly 2004-11-16
  • 打赏
  • 举报
回复
同意
centerstar 2004-11-16
  • 打赏
  • 举报
回复
<script language="JavaScript" type="text/javascript">
var timeid = null;
function showtime(){
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
timevalue=" " + ((hours>12)?hours-12:hours);
timevalue += ((minutes<10)?":0":":") + minutes;
timevalue += ((seconds<10)?":0":":") + seconds;
timevalue = ((hours>12)?" 下午:":" 上午:") + timevalue;
mytimer.innerHTML = "<font color=black><nobr> " + timevalue + " </nobr></font>";
//探针,周期 1 分钟
//if((minutes % 3 == 0) && (seconds % 59 == 0)){msgalert.location.href = 'employee/msg_alert.asp';}
//################################
timeid = setTimeout("showtime()",1000);
}
</script>
sdts 2004-11-16
  • 打赏
  • 举报
回复
"VBS中没有setTimeout()" 看看楼上的 本来是求教的贴 现在变传教了
meizz 2004-11-16
  • 打赏
  • 举报
回复
setTimeout("Foo()", 500, "vbscript")
freetaiger 2004-11-16
  • 打赏
  • 举报
回复
Function nowtime()
ntime=Time()
str2 = Hour(ntime)&"时" & Minute(ntime) & "分" & Second(ntime) & "秒"
nntime.innerTEXT=str2
END Function

setTimeout("nowtime()",1000)

这样试试
sdts 2004-11-16
  • 打赏
  • 举报
回复
自己解决了 setTimeout("nowtime()",1000)-->setTimeout "nowtime()",1000

"setTimeout是javascript的函数在VBScript中是now()取当前日期和时间的"
楼上的大哥错误观念
setTimeout是window对象的方法 window对象是浏览器的顶级对象 并不属于哪种语言


heyixiang 2004-11-16
  • 打赏
  • 举报
回复
VBS中没有setTimeout()
alern_zyb 2004-11-16
  • 打赏
  • 举报
回复
setTimeout是javascript的函数在VBScript中是now()取当前日期和时间的

28,390

社区成员

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

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