您现在的位置是:网站首页> 编程资料编程资料

VBS InternetExplorer.Application的属性和方法介绍_vbs_

2023-05-25 235人已围观

简介 VBS InternetExplorer.Application的属性和方法介绍_vbs_

示例代码

 Set ie = CreateObject("InternetExplorer.Application") ie.Navigate "https://www.jb51.net" Wscript.Sleep 1000 ie.Toolbar = 0 ie.visible=False ie.Document.f1.word.value = kw If ie.Document.f1.word.value="" Then Wscript.Quit 

上面是在网上看到的,Navigate Toolbar visible 等都是怎么用的??
怎么网上找不到它们的用法?
下面是一些属性说明:

Set ie=WScript.CreateObject("internetexplorer.application")
ie.menubar=0 '不显示IE对象菜单栏
ie.AddressBar=0 '不显示IE对象地址栏
ie.ToolBar=0 '不显示IE对象工具栏
ie.StatusBar=0 '不显示IE对象状态栏
ie.FullScreen=1 '全屏化IE对象
ie.Width=800 '设置IE对象宽度
ie.Height=600 '设置IE对象高度
ie.Resizable=0 '设置IE对象大小是否可以被改动
ie.visible=1 '设置是否可见
ie.Navigate "https://www.jb51.net" '设置IE对象默认指向的页面

目的留个备份,方便我以后去MSDN上找用法。

InternetExplorer Object

42 out of 82 rated this helpful Rate this topic

Controls an instance of Windows Internet Explorer through automation.

Members Table

The following table lists the members exposed by the InternetExplorer object.

Events

EventDescription
BeforeNavigateFires before navigation occurs in the given object (on either a window or frameset element).
BeforeNavigate2Fires before navigation occurs in the given object (on either a window element or a frameset element).
CommandStateChangeFires when the enabled state of a command changes.
DocumentCompleteFires when a document is completely loaded and initialized.
DownloadBeginFires when a navigation operation begins.
DownloadCompleteFires when a navigation operation finishes, is halted, or fails.
FileDownloadFires to indicate that a file download is about to occur. If a file download dialog box can be displayed, this event fires prior to the appearance of the dialog box.
NavigateCompleteFires after a navigation to a link is completed on either a window element or a frameSet element.
NavigateComplete2Fires after a navigation to a link is completed on a window element or a frameSet element.
NavigateErrorFires when an error occurs during navigation.
NewProcessCreates a new process to handle the navigation.
NewWindowFires when a new window is to be created.
NewWindow2Fires when a new window is to be created.
NewWindow3Raised when a new window is to be created. Extends NewWindow2 with additional information about the new window.
OnFullScreenFires when the FullScreen property is changed.
OnMenuBarFires when the MenuBar property is changed.
OnQuitFires before the Internet Explorer application quits.
OnStatusBarFires when the StatusBar property is changed.
OnTheaterModeFires when the TheaterMode property is changed.
OnToolBarFires when the ToolBar property is changed.
OnVisibleFires when the Visible property of the object is changed.
PrintTemplateInstantiationFires when a print template is instantiated.
PrintTemplateTeardownFires when a print template is destroyed.
PrivacyImpactedStateChangeFired when an event occurs that impacts privacy, or when a user navigates away from a URL that has impacted privacy.
ProgressChangeFires when the progress of a download operation is updated on the object.
PropertyChangeFires when the PutProperty method of the object changes the value of a property.
RedirectXDomainBlockedFired when a cross-domain redirect request is blocked.
SetPhishingFilterStatusFires to indicate the progress and status of Microsoft Phishing Filter analysis of the current webpage.
SetSecureLockIconFires when there is a change in encryption level.
StatusTextChangeFires when the status bar text of the object has changed.
ThirdPartyUrlBlockedFired when a third-party URL is blocked.
TitleChangeFires when the title of a document in the object becomes available or changes.
UpdatePageStatusNot implemented.
WindowActivateNot implemented.
WindowMoveNot implemented.
WindowResizeNot implemented.
WindowStateChangedFires when the visibility state of a content window, such as the browser window or a tab, changes.

Methods

MethodDescription
ClientToWindowComputes the full size of the browser window when given the specified width and height of the content area.
ExecWBExecutes a command and returns the status of the command execution using the IOleCommandTarget interface.
GetPropertyGets the value associated with a user-defined property name.
GoBackNavigates backward one item in the history list.
GoForwardNavigates forward one item in the history list.
GoH