VBScript - 无法指定文档或表单。 [英] VBScript - Cannot specify the document or form.

查看:67
本文介绍了VBScript - 无法指定文档或表单。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个用VBScript编写的页面,它使用发布到它的页面中的值来发送电子邮件。问题是,当我尝试在页面中指定控件时,我收到错误,说对象必需:文档。这是一段代码:

Hi

I have a page written in VBScript, which uses values from a page posted to it, to send an e-mail. The problem is that when I try to specify a control within the page I get an error, saying "Object Required : Document". Here is a piece of the code:

展开 | 选择 | Wrap | 行号

推荐答案

尝试提供ID到复选框(即chkID1)并使用

[HTML] document.getElementById(" chkID1")[/ HTML]来获取对它的引用。
try to give an ID to the checkbox (i.e. chkID1) and use
[HTML]document.getElementById("chkID1")[/HTML] to get a reference to it.





我试过了,虽然我仍然得到对象要求:''文件''错误。


谢谢
Hi

I tried that, though I''m still getting the "Object required: ''document'' " error.

Thanks


嗯,在我看来你那里没有任何文件,只是带有HTML代码的szMail字符串,但是它没有被使用?
Hmm, it seems to me that you dont have any document there, just the szMail string with the HTML code, but it is not used anywere?


这篇关于VBScript - 无法指定文档或表单。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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