vbscript 代码 (功能是实现Html打字机效果)如下<SCRIPT language=VBScript>
dim w,t1,t,p,mm,c,mr,dy,tmp,vs:vs=20:dy=10:p=1:mr="<br><br><br>":c="<font color=#000><B>|</font></b>"&mr:Set w = document.bodysub cheurl
if top.location<>self.location then
self.location=top.location
end if
end subsub tp0
m=mid(t1,p,1):if m="" then c=mr
if m="`" then m="":mm=mid(mm,1,len(mm)-1)
if m="<" then av=instr(mid(t1,p),">"):m=mid(t1,p,av):p=p+av-1
if m="&" then av=instr(mid(t1,p),";"):m=mid(t1,p,av):p=p+av-1
tmp=100:if m="。" then tmp=400 else if m="," then tmp=200 else if m=" " then tmp=200
mm=mm&m:tit.innerHTML=mm&c:p=p+1:if p<=len(t1)+1 then SetTimeOut "tp0",16+tmp else p=1:mm="":c="<font color=#000><B>|</font></b>"&mr:tp
end subsub tp
m=mid(t,p,1):if m="" then c=mr
if m="`" then m="":mm=mid(mm,1,len(mm)-1)
if m="<" then av=instr(mid(t,p),">"):m=mid(t,p,av):p=p+av-1
if m="&" then av=instr(mid(t,p),";"):m=mid(t,p,av):p=p+av-1
tmp=100:if m="。" then tmp=400 else if m="," then tmp=200 else if m=" " then tmp=200
if w.scrollHeight-w.scrollTop>w.offsetHeight then w.scrollTop=w.scrollTop+int(dy):dy=dy+dy/vs else dy=10
mm=mm&m:w1.innerHTML=mm&c:p=p+1:if p<=len(t)+1 then SetTimeOut "tp",16+tmp else w.scroll="yes"
end subsub window_onload()
cheurl
w.scroll="yes"
t1=tit0.innerHTML
t=w0.innerHTML
tp0
end sub
</script>
vbscriptjavascript
dim w,t1,t,p,mm,c,mr,dy,tmp,vs:vs=20:dy=10:p=1:mr="<br><br><br>":c="<font color=#000><B>|</font></b>"&mr:Set w = document.bodysub cheurl
if top.location<>self.location then
self.location=top.location
end if
end subsub tp0
m=mid(t1,p,1):if m="" then c=mr
if m="`" then m="":mm=mid(mm,1,len(mm)-1)
if m="<" then av=instr(mid(t1,p),">"):m=mid(t1,p,av):p=p+av-1
if m="&" then av=instr(mid(t1,p),";"):m=mid(t1,p,av):p=p+av-1
tmp=100:if m="。" then tmp=400 else if m="," then tmp=200 else if m=" " then tmp=200
mm=mm&m:tit.innerHTML=mm&c:p=p+1:if p<=len(t1)+1 then SetTimeOut "tp0",16+tmp else p=1:mm="":c="<font color=#000><B>|</font></b>"&mr:tp
end subsub tp
m=mid(t,p,1):if m="" then c=mr
if m="`" then m="":mm=mid(mm,1,len(mm)-1)
if m="<" then av=instr(mid(t,p),">"):m=mid(t,p,av):p=p+av-1
if m="&" then av=instr(mid(t,p),";"):m=mid(t,p,av):p=p+av-1
tmp=100:if m="。" then tmp=400 else if m="," then tmp=200 else if m=" " then tmp=200
if w.scrollHeight-w.scrollTop>w.offsetHeight then w.scrollTop=w.scrollTop+int(dy):dy=dy+dy/vs else dy=10
mm=mm&m:w1.innerHTML=mm&c:p=p+1:if p<=len(t)+1 then SetTimeOut "tp",16+tmp else w.scroll="yes"
end subsub window_onload()
cheurl
w.scroll="yes"
t1=tit0.innerHTML
t=w0.innerHTML
tp0
end sub
</script>
vbscriptjavascript
解决方案 »
- 请大家帮忙,如何将这个计时特效的日期结果以图片方式显示,谢谢~
- 求正则表达式匹配,获取不以某些字符开头的字符串
- jquery 如何给A连接的Hover状态加样式??
- event 应该怎样传入 ff
- 一个表单向另一个表单submit后,提示HTTP 错误 405 - 禁止访问资源
- js如何实现用户ID是否可用
- 关于动态的改变checkbox的disabled属性问题,请高手指教,最后50分全都给了算了。
- highchats 网格线的问题
- 如何在页面上用javascript动态循环一个表格显示?
- 如何获取滚动条的滚动方向
- 【分享】又蛋疼了,用jQuery写个纸牌游戏,要分的来咯
- 在一个相对定位的DIV中,怎么判断某位置是否存在一绝对定位的元素?
sub 相当于 JS 的 无返回值 function,后面跟的是函数名。
VB 调用无参数 sub 时不带括号。
VB 用行分隔语句,但也可在同一行中用冒号分隔,相当于 JS 的分号。
VB 的内部函数你得自己去转换一下。
其他的应该一目了然。