【发布时间】:2016-11-20 04:53:07
【问题描述】:
我试图在我的代码发送后显示一个 msgbox。 我想显示内部文本。
到现在为止
ie = CreateObject("InternetExplorer.Application")
ie.Navigate("http://www.webpage.com.au/")
ie.Visible = True
mesg = TextBox1.Text.ToString()
pw = "....." ie.Document.All("password").Value = pw
ie.Document.All("idpagers").Value = Id
ie.Document.All("message").Value = mesg
ie.Document.All("Send").Click()
pID = ie.Document.All().ToString
MessageBox.Show(pID)
但这显示了system.object.blah.blah
【问题讨论】:
-
Vb 脚本对不起,我添加了错误的标签
-
问题是使用
ToString(),它只是给你一个字符串表示你调用它的对象,因此System.Object等。使用InnerHTML()和innerText()而不是返回HTML表示DOM 元素或只是文本表示。 -
@Lankymart 您能否举个例子作为答案,如果正确,我可以标记为已回答
-
这里已经有两个答案,使用
InnerText()和InnerHTML()的详细信息,我只是指出ToString()没有给你你所期望的。
标签: internet-explorer vbscript com messagebox