Blinking Background

Posted: December 18, 2007 in JavaScript Stuffs

Heading Blinking Background

Description JavaScript “Blinking Background with different Colors”

Preview N/A

Code

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 Final//EN”>
<HTML>
<HEAD>
<META NAME=”Generator” CONTENT=”TextPad 4.4″>
<LINK href=”general.css” rel=”stylesheet” type=”text/css”>
<SCRIPT LANGUAGE=”JavaScript”>
<!– Begin
function blinkit(){
intrvl=0;
for(nTimes=0;nTimes<3;nTimes++){
intrvl += 200;
setTimeout(“document.bgColor=’#0000FF’;”,intrvl);
intrvl += 200;
setTimeout(“document.bgColor=’#FFFFFF’;”,intrvl);
}
}
// End –>
</SCRIPT>

</HEAD>

<BODY Bgcolor=#E0E0E0>
<center><BR><BR><BR>
<FORM>
<INPUT TYPE=”BUTTON” VALUE=”Blink” onClick=”blinkit()”>
</FORM>

</center>
</BODY>
</HTML>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s