Can we have multiple input text boxes in VBScript? I'm trying to create a form window using VBScript itself. I should get two values as input. Please help me.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You have a few options that I can see.
- Create an HTA that contains multiple textboxes for input.
- Call InputBox() once for each input required.
- Develop your input form as COM ActiveX control that can be instantiated from VBScript. With RegFree, you don't need to install this COM control on your clients.
If it makes sense to do so, use a single InputBox() but ask the user to delimit their input. Here's an example of this technique. Note the use of the default parameter to demonstrate to the user what you're looking for.
Do s = InputBox("Enter the starting and ending years:", "Year Range", "2010-2014") Loop While Len(s) > 0 And InStr(s, "-") = 0 If Len(s) = 0 Then ' No input or cancel clicked Else s = Split(s, "-") End If
回答2:
This is possible with HTA via VBScript.
Try this one http://forum.script-coding.com/viewtopic.php?pid=75356#p75356
Just add the second inputbox.
回答3:
IN a form no you cannot, but you could do this in VBS, It would list a series of input box's and the input to the frst box can be used in the title and/or description of the next text box
Firstresponse = inputbox("Enter Message", "Enter your Title")
Secondresponse = inputbox("Enter Message " & Firstresponse, "Enter your Title")