09/16: Windows.Onload VS Document.body.Onload
- document.body.onload is triggered when the body content is loaded . So it happens before windows.onload:
document.body.onload>windows.onload
- the method for body.onload can only be written under or after body tag.
- the method for window.onload can be written anywhere.
<html>
<head>
<title>Onload Example</title>
</head>
<body onload=”alert(‘Goodbye’)”> // can not written before <body..>
</body>
</html>
0 Comments:
Post a Comment
<< Home