在VBScript中输入多个文本框 [英] Multiple TextBox for Input in VBScript

查看:253
本文介绍了在VBScript中输入多个文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以在VBScript中有多个输入文本框吗?我试图使用VBScript本身创建窗体窗口。我应该得到两个值作为输入。请帮助我。

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. 创建一个包含多个文本框以供输入的HTA。

  2. 为每个输入需要调用InputBox()一次。
  3. 将输入表单开发为可以从VBScript实例化的COM ActiveX控件。使用RegFree,您不需要在您的客户端上安装此COM控件。

  4. 如果有意义,请使用一个InputBox(),但要求用户划定他们的意见。这是这种技术的一个例子。请注意,使用默认参数向用户展示您要查找的内容。

  1. Create an HTA that contains multiple textboxes for input.
  2. Call InputBox() once for each input required.
  3. 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.
  4. 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


这篇关于在VBScript中输入多个文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆