最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

onload Event

Internet Development Index

Fires immediately after the browser loads the object.

Syntax

Inline HTML<ELEMENT onload = "handler" ... > All platforms
Event propertyobject.onload = handlerJScript only
object.onload = GetRef("handler")Visual Basic Scripting Edition (VBScript) 5.0 or later only
Named script <SCRIPT FOR = object EVENT = onload> Internet Explorer only

Event Information

BubblesNo
CancelsNo
To invoke Open a page in the browser to invoke this event for the document or any object within it.
Default action Loads the object for which the event is specified.

Event Object Properties

Although event handlers in the DHTML Object Model do not receive parameters directly, a handler can query an event object for data.

Available Properties

altKey Sets or retrieves a value that indicates the state of the ALT key.
altLeft Sets or retrieves a value that indicates the state of the left ALT key.
clientX Sets or retrieves the x-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
clientY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
ctrlLeft Sets or retrieves the state of the left CTRL key.
offsetX Sets or retrieves the x-coordinate of the mouse pointer's position relative to the object firing the event.
offsetY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the object firing the event.
screenX Retrieves the x-coordinate of the mouse pointer's position relative to the user's screen.
screenY Sets or retrieves the y-coordinate of the mouse pointer's position relative to the user's screen.
shiftLeft Retrieves the state of the left SHIFT key.
type Sets or retrieves the event name from the event object.
x Sets or retrieves the x-coordinate, in pixels, of the mouse pointer's position relative to a relatively positioned parent element.
y Sets or retrieves the y-coordinate, in pixels, of the mouse pointer's position relative to a relatively positioned parent element.

Remarks

The browser loads applications, embedded objects, and images as soon as it encounters the applet, embed, and img objects during parsing. Consequently, the onload event for these objects occurs before the browser parses any subsequent objects. To ensure that an event handler receives the onload event for these objects, place the script object that defines the event handler before the object and use the onload attribute in the object to set the handler.

The onload attribute of the body object sets an onload event handler for the window. This technique of calling the window onload event through the body object is overridden by any other means of invoking the window onload event, provided the handlers are in the same script language.

Examples

This example uses an onload event handler to display a message in the window's status bar when the page has finished loading.

<BODY>
<SCRIPT FOR=window EVENT=onload LANGUAGE="JScript">
window.status = "Page is loaded!";
</SCRIPT>
</BODY>

This example sets an onload event handler for an img object. The handler uses the event object to retrieve the URL of the image.

<SCRIPT>
function imageLoaded()
{
window.status = "Image " + event.srcElement.src + " is loaded";
}
</SCRIPT>
<BODY>
<IMG SRC="sample.gif" onload="imageLoaded()">
</BODY>

Standards Information

This event is defined in HTML 4.0 Non-Microsoft link.

Applies To

APPLET, BODY, EMBED, FRAME, FRAMESET, IFRAME, IMG, LINK, SCRIPT, window

See Also

onreadystatechange, onunload
丹巴县| 通化市| 甘肃省| 山东省| 德令哈市| 定南县| 西平县| 英吉沙县| 英山县| 奎屯市| 阳谷县| 商河县| 沅江市| 丽水市| 乐清市| 高雄县| 海兴县| 浦东新区| 清苑县| 姚安县| 潮安县| 始兴县| 柏乡县| 许昌县| 疏附县| 满城县| 鸡东县| 广灵县| 吉林省| 肇源县| 平陆县| 营口市| 高邮市| 台中县| 礼泉县| 巫溪县| 英德市| 曲麻莱县| 宜宾市| 灵丘县| 政和县|