我可以将GoTo用于UI:?

时间:2016-06-04 02:24:46

标签: vbscript

我正在为我正在制作的这个软件包创建一个用户界面,我正在努力做出“后退”选择。回到之前的事情。

.bd-image{

background: 
url(images/orange-dark_01.jpg) 0px 0px / 100% 46px no-repeat,  
url(images/orange-dark_02.jpg)  0px 46px / 100% 60px no-repeat,   
url(images/orange-dark_03.jpg) 0px 106px / 100% 48px no-repeat,
url(images/orange-dark_04.jpg) 0px 154px / 100% 48px no-repeat,
url(images/orange-dark_05.jpg) 0px 202px / 100% 58px no-repeat, 
url(images/orange-dark_06.jpg) 0px 260px / 100% 48px no-repeat, 
url(images/orange-dark_07.jpg)  0px 308px / 100% 50px no-repeat,
url(images/orange-dark_08.jpg)  0px 358px / 100% 36px no-repeat,
url(images/orange-dark_09.jpg)  0px 394px / 100% 40px no-repeat,
url(images/orange-dark_10.jpg)  0px 434px / 100% 50px no-repeat,
url(images/orange-dark_11.jpg)  0px 484px / 100% 64px no-repeat,
url(images/orange-dark_12.jpg)  0px 548px / 100% 52px no-repeat,
url(images/orange-dark_13.jpg)  0px 600px / 100% 42px no-repeat,
url(images/orange-dark_14.jpg)  0px 642px / 100% 62px no-repeat,
url(images/orange-dark_15.jpg)  0px 704px / 100% 46px no-repeat,
url(images/orange-dark_16.jpg)  0px 750px / 100% 48px no-repeat,
url(images/orange-dark_17.jpg)  0px 798px / 100% 56px no-repeat,
url(images/orange-dark_18.jpg)  0px 854px / 100% 64px no-repeat,
url(images/orange-dark_19.jpg)  0px 918px / 100% 52px no-repeat,
url(images/orange-dark_20.jpg)  0px 970px / 100% 50px no-repeat,
url(images/orange-dark_21.jpg)  0px 1020px / 100% 40px no-repeat,
url(images/orange-dark_22.jpg)  0px 1060px / 100% 42px no-repeat,
url(images/orange-dark_23.jpg)  0px 1102px / 100% 52px no-repeat,
url(images/orange-dark_24.jpg) 0px 1154px / 100% 46px no-repeat;
z-index:100;
}

</style>
</head>
<body class="bd-image" onload="StartTimers();" onmousemove="ResetTimers();">

所以我希望如果他们输入“Back”进入InputBox,它将返回到脚本的开头。如果有人知道如何做到这一点,我真的很感激!

1 个答案:

答案 0 :(得分:1)

VBScript没有go to,你需要一个循环和退出。如:

Do
  WScript.StdOut.Write "A or B or Q to quit > "
  Select Case WScript.StdIn.ReadLine()
    Case "A"
      WScript.StdOut.WriteLine "A"
      Exit Do
    Case "B"
      WScript.StdOut.WriteLine "B"
      Exit Do
    Case "Q"
      WScript.StdOut.WriteLine "Q"
      Exit Do
    Case Else
      WScript.StdOut.WriteLine "Bad Input"
    End Select
Loop
WScript.StdOut.WriteLine "Done"

输出:

cscript 7625740.vbs
A or B or Q to quit > A
A
Done

cscript 7625740.vbs
A or B or Q to quit > C
Bad Input
A or B or Q to quit > Q
Q
Done