Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions onload_event.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<html>
<head><title>OnLoad Event</title></head>
<body OnLoad='window.setTimeout("f1()",1000)'; onunload="msg()">
<form>
</form>
<script type="text/javascript">
function f1()
{
document.bgColor="blue";
window.setTimeout("f2()",1000);
}
function f2()
{
document.bgColor="pink";
window.setTimeout("f3()",1000);
}
function f3()
{
document.bgColor="green";
window.setTimeout("f4()",1000);
}
function f4()
{
document.bgColor="yellow";
window.setTimeout("f5()",1000);
}
function f5()
{
document.bgColor="red";
window.setTimeout("f6()",1000);
}
function f6()
{
document.bgColor="gray";
window.setTimeout("f7()",1000);
}
function f7()
{
document.bgColor="black";
window.setTimeout("f1()",1000);
}
function msg()
{
alert("Do you want to close?");
}
</script>
</body>
</html>