0% found this document useful (0 votes)
9 views

color javascript output

iuhygy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

color javascript output

iuhygy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

<!

DOCTYPE html>

<html>

<head>

<title>Background color</title>

</head>

<body>

<h1 align="center">7 different & visibly distinct background colors</h1>

<form name="frm 1">

<center>

<input type="button"name="btncolor"value="Change Colors" onMouseOver="f1()">

<input type="button"name="btnmsg"value="Message Display"onClick="msg()">

</form>

</body>

<script type="text/javascript">

function f1()

document.bgColor="red";

window.setTimeout("f2()",1500);

function f2()
{

document.bgColor="green";

window.setTimeout("f3()",1500);

function f3()

document.bgColor="blue";

wimdow.setTimeout("f4()",1500);

function f4()

document.bgColor="orange";

window.setTimeout("f5()",1500);

function f5()

document.bgColor="skyblue";

window.setTimeout("f6()",1500);

function f6()

document.bgColor="voilet";

window.setTimeout("f7()",1500);

function f7()
{

document.bgColor="aqua";

window.setTimeout("f1()",1500);

function msg()

alert("Display of 7 different color");

</script>

</html>

You might also like