Tests for body onload behaviour

This commit is contained in:
Daniel Silverstone 2015-11-22 16:53:22 +00:00
parent c92726d3aa
commit 4137739b8a
3 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,10 @@
<html>
<head>
<title>alert based onload (from body) example</title>
</head>
<body onload="alert('Running onload')">
<h1>Just look at the log</h1>
</body>
</html>

View File

@ -0,0 +1,13 @@
<html>
<head>
<title>alert based onload (from body IDL attribute) example</title>
</head>
<body>
<h1>Just look at the log</h1>
<script type="text/javascript">
document.body.onload = function() { alert("onload event from IDL attribute"); };
</script>
</body>
</html>

View File

@ -80,6 +80,7 @@
<h2>Dom events</h2>
<ul>
<li><a href="event-onload.html">window.onload</a></li>
<li><a href="event-onloadfrombody.html">body.onload</a></li>
<li><a href="event-onclick.html">button.onclick</a></li>
</ul>