共用方式為


IHTMLScriptElement interface

This interface specifies a script for the page that will be interpreted by a script engine.

Members

The IHTMLScriptElement interface inherits from the IDispatch interface. IHTMLScriptElement also has these types of members:

  • Properties

Properties

The IHTMLScriptElement interface has these properties.

Property Description

defer

Sets or retrieves the status of the script.

event

Sets or retrieves the event for which the script is written.

htmlFor

Sets or retrieves the object that is bound to the event script.

readyState

Retrieves a value that indicates the current state of the object.

src

Retrieves the URL to an external file that contains the source code or data.

text

Retrieves or sets the text of the object as a string.

type

Sets or retrieves the MIME type for the associated scripting engine.

 

Remarks

Code within the script block that is not contained within a function is executed immediately as the page is loaded. To keep scripts from being displayed on down-level browsers, the script block should be nested within a comment block.

The script element is a block element.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

IDispatch

IHTMLScriptElement2