Board logo

标题: 请教一下VBS的跳转命令 [打印本页]

作者: a888888    时间: 2009-1-11 15:44     标题: 请教一下VBS的跳转命令

批处理的跳转命令是goto,VBS的跳转命令是什么呢,最好有一个简单的例子说明,谢谢了!
作者: rat    时间: 2009-1-11 16:28

没有
作者: yslyxqysl    时间: 2009-1-11 16:55

我只能想到:
Do
...
If str="pw" Exit Do
...
Exit Do
Loop
作者: defanive    时间: 2009-1-11 23:55

VB(还是VC++)里面有goto命令和label:做标签,VBS就不知道了。。。

网上没有相关资料,估计就是没有了。。。
作者: fastslz    时间: 2009-1-12 17:17

用Call....Function语法代替
  1. Call str1("你好")
  2. MsgBox "继续"
  3. Call str2("你好吗")
  4. Function str1(text)
  5.    MsgBox text
  6. End Function
  7. MsgBox "再继续"
  8. Function str2(text)
  9.    If text <> "你好吗" Then
  10.       Exit Function
  11.       Else
  12.       MsgBox text
  13.    End If
  14. End Function
复制代码





欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2