Fires immediately after the browser loads the object
解决方案 »
- 网站如何调用远程网页代码
- 用js如何控制打印?
- 请问可以用js获取图层的display属性吗?
- 一个标签如何调用2个脚本方法
- 在一个INPUT中有默认的value值,当鼠标单机时清空value值,应该怎么写?
- 坚持了好几天,总算网站开张了!因为要离开一段时间,散分!
- 请问JavaScript可以对本地的数据库进行操作么?比如:查询,插入,修改等
- 请教:我在母页面中打开另一个页面,在打开的页面中输入某个条件,按按钮则关闭这个页面,在母页面中显示根据条件得到的新内容,怎么刷新
- javascript中的字符串查找如何实现???
- 上传附件如何把路径去掉只留文件名和文件类型
- 介绍一个开发人员技术知识库网站,刚增加仿csdn的论坛,欢迎大家来看看,up有分拿阿
- 有谁的问题比我还菜!!!!
onload Event Internet Development Index --------------------------------------------------------------------------------Fires immediately after the browser loads the object. SyntaxInline HTML <ELEMENT onload = "handler" ... > All platforms
Event property object.onload = handler JScript 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 InformationBubbles No
Cancels No
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 PropertiesAlthough event handlers in the DHTML Object Model do not receive parameters directly, a handler can query an event object for data.Show Available PropertiesaltKey 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. ResThe 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. ExamplesThis 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.
还有一个问题:html文件中的代码是不是从上往下执行的,例如有20个同一个等的table是不是执行到第二table时第一个tabel中的内容已经在网页上可以显示出来的了呢? 另外如果每个表中都有一段javascript,是不是也是按顺序执行,执行完一段显示一段呢?
还有一个问题:html文件中的代码是不是从上往下执行的,例如有20个同一个等的table是不是执行到第二table时第一个tabel中的内容已经在网页上可以显示出来的了呢? 另外如果每个表中都有一段javascript,是不是也是按顺序执行,执行完一段显示一段呢?
还有一个问题:html文件中的代码是不是从上往下执行的,例如有20个同一个等的table是不是执行到第二table时第一个tabel中的内容已经在网页上可以显示出来的了呢? 另外如果每个表中都有一段javascript,是不是也是按顺序执行,执行完一段显示一段呢?