dim doc as CObject
doc.SetObject me.WebBrowser1.Document'先获取WebBrowser1控件的文档接口
doc.Get("getElementById" ,"kw").Put("value" ,"test")'调用getElementById方法获得百度kw文本框,并设置value为test
if doc.IsErr Then PrintA doc.ErrDescription'显示错误
doc.ClearErr'清除错误
doc.Get("getElementById" ,"su").Run("click")'获得百度一下按钮并点击
Dim pw As CObject = Doc.Get("parentWindow")'获得parentWindow接口
pw.Run("execScript","alert('1')")'调用execScript方法运行js命令alert('1')