Dom VBScript和JScript似乎以不同的方式处理element.click方法。为什么?

Dom VBScript和JScript似乎以不同的方式处理element.click方法。为什么?,dom,scripting,vbscript,javascript,Dom,Scripting,Vbscript,Javascript,伙计们。下面是VBScript中的另一个示例脚本。它打开internet explorer,导航到google,设置搜索字段并提交查询 set ie = CreateObject("InternetExplorer.Application") ie.navigate("www.google.com") ie.visible = true while ie.readystate <> 4 wscript.sleep 100 WEnd set fields = ie.do

伙计们。下面是VBScript中的另一个示例脚本。它打开internet explorer,导航到google,设置搜索字段并提交查询

set ie = CreateObject("InternetExplorer.Application")

ie.navigate("www.google.com")

ie.visible = true

while ie.readystate <> 4
    wscript.sleep 100
WEnd

set fields = ie.document.getelementsbyname("q")
set buttons = ie.document.getelementsbyname("btnG")

fields(0).value = "some query"
buttons(0).click
它正确地将搜索字段设置为“某些查询”,但它没有单击按钮!从字面上看,在
输入(0)之后没有任何事情发生

我对JScript还不熟悉,所以我想知道,是不是我对某些特定的细节愚蠢无知

button(0).click;
是对函数的引用

button(0).click();
将是函数调用

(还有,它不应该是方括号吗?)

button(0).click();