UK ['?nl??d] US ['?nlo?d]

vt.Loading

javascript onload attribute syntax

Function: Occurs immediately after the page or image is loaded.

Syntax: onload="SomeJavaScriptCode"

Parameters: SomeJavaScriptCode Required. Specifies the JavaScript to be executed when this event occurs.?

javascript onload attribute example

<html>
<head>
<script type="text/javascript">
function load()
{
//在頁(yè)面完成加載時(shí)在狀態(tài)欄顯示一段文本。
window.status="Page is loaded"
}
</script>
</head>

<body onload="load()">
</body>

</html>

Run instance ?

Click the "Run instance" button to view the online instance