我有如下代码。我想将 K:\work 中的所有子文件夹输出到此 HTA 的下拉列表中。因为 k:\work 中的所有子文件夹一直在变化。所以每次我点击下拉列表时,它都需要有最新的内容。根据我的代码可以做到这一点吗?而且当我选择新客户时,我需要有一个弹出窗口允许我输入名称并创建一个新文件夹。
在我的代码中,我只有 1 个下拉列表。我需要在这个 HTA 中有 7 个下拉列表,所有这些都具有相同的概念,如果不存在可以创建新文件夹。文件结构是这样的:K:\CUSTOMER\DESIGN\DETAIL\ORDER...... 每个下拉列表都会输出一层子文件夹,如果我在下拉列表中从上一层选择一个文件夹,下拉列表的其余部分将自动更改为该父文件夹中的子文件夹。任何人都可以帮助我吗?
<HEAD>
<TITLE>K Drive Program Structure</TITLE>
<HTA:APPLICATION ID="AIDS"
APPLICATIONNAME="K Drive Program Structure"
BORDER="Dialog"
CAPTION="Yes"
SCROLL="NO"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="yes"
SYSMENU="Yes"
WINDOWSTATE="maximize">
</HEAD>
<BODY>
<SCRIPT LANGUAGE="VBScript">
Sub Window_OnLoad
Window.Site.Focus
End Sub
Sub btn01_OnClick
Dim strProduct
oElements = Window.Site.SelectedIndex
strProduct = Window.Site.Options(oElements).Text
Select Case strProduct
Case "AMCAN HONSEL"
MsgBox "You selected AMCAN HONSEL",64,"Selection"
Case "CHRYSLER ETOBICOKE"
MsgBox "You selected CHRYSLER ETOBICOKE",64,"Selection"
Case "CHRYSLER KOKOMO"
MsgBox "You selected CHRYSLER KOKOMO",64,"Selection"
Case "GM POWERTRAIN"
MsgBox "You selected GM POWERTRAIN",64,"Selection"
Case "MERCEDES BENZ"
MsgBox "You selected MERCEDES BENZ",64,"Selection"
Case "NEMAK"
MsgBox "You selected NEMAK",64,"Selection"
Case "NEW CUSTOMER"
MsgBox "You selected NEW CUSTOMER",64,"Selection"
End Select
End Sub
Sub btn02_OnClick
Window.Close
End Sub
</SCRIPT>
<H2>K Drive Structure</H2>
<P>Please select or create:
<SELECT NAME="Site">
<OPTION>AMCAN HONSEL</OPTION>
<OPTION>CHRYSLER ETOBICOKE</OPTION>
<OPTION>CHRYSLER KOKOMO</OPTION>
<OPTION>GM POWERTRAIN</OPTION>
<OPTION>MERCEDES BENZ</OPTION>
<OPTION>NEMAK</OPTION>
<OPTION>NEW CUSTOMER</OPTION>
</SELECT><P>
<BR>
<BR>
<Input Type = "Button" Name = "btn01" VALUE = "SUBMIT">
<Input Type = "Button" Name = "btn02" VALUE = "CLOSE">
<BR>
<BR>
</BODY>