|
下面这段代码是VBScript语言参考里面的,我一模一样复制粘贴成html文件后运行竟然报错,应该怎么修改?谢谢!
- <HTML>
- <HEAD><TITLE>窗体与元素</TITLE></HEAD>
- <SCRIPT LANGUAGE="VBScript">
- <!--
- Sub cmdChange_OnClick
- Dim d '创建一个变量
- Set d = CreateObject("Scripting.Dictionary")
- d.Add "0", "Athens" '添加键和项目
- d.Add "1", "Belgrade"
- d.Add "2", "Cairo"
- For Each I in d
- Document.frmForm.Elements(I).Value = D.Item(I)
- Next
- End Sub
- -->
- </SCRIPT>
- <BODY>
- <CENTER>
- <FORM NAME="frmForm"
- <Input Type = "Text"><p>
- <Input Type = "Text"><p>
- <Input Type = "Text"><p>
- <Input Type = "Text"><p>
- <Input Type = "Button" NAME="cmdChange" VALUE="单击此处"><p>
- </FORM>
- </CENTER>
- </BODY>
- </HTML>
复制代码 |
|