Home > Uncategorized > background warna-warni

background warna-warni

mau bikin background warna-warni pke java script???. copy aj ni coding di bawah

<html>
<head>
<title></title>
</head>

<SCRIPT LANGUAGE=”JavaScript”>

var pos = 10;
function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = initArray.arguments[i];
}
}
var col=new initArray(“4b”,”5b”,”8b”,”8b”);
function stop() {
document.bgColor = ‘#FFFFFF’;
clearTimeout(loopID);
}
function start() {
col[1]=”red”
col[2]=”yellowgreen”
col[3]=”yellow”
col[4]=”whitesmoke”
col[5]=”white”
col[6]=”wheat”
col[7]=”violet”
col[8]=”turquoise”
col[9]=”tomato”
col[10]=”thistle”
pos++;
if (pos<0||pos>10) {
pos = 0;
}
document.bgColor = col[pos];
loopID = setTimeout(“start()”,1000);
}

</SCRIPT>

<p align=”center”>&nbsp;</p>

<BODY onLoad=”start()”>

</body>
</html>

Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

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

%d bloggers like this: