Script Categories













Background Effects >>> Text Blinker.

JavaScript 1.2 (found in version 4.0 browsers) provides this neat effect: the text changes color every second.

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = initArray.arguments[i];
   }
}

var ctext = "Wow! Look at all the pretty colors!  ;-)";
var speed = 1000;
var x = 0;
var color = new initArray(
"red",
"blue",
"green",
"black"
);
document.write('<div align="center" id="c">'+ctext+'</div>');
function chcolor(){
document.getElementById("c").style.color=color[x];
(
x < color.length-1) ? x++ : x = 0;
}
setInterval("chcolor()",1000);
// End -->
</script>

Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).

baca manga online: Komiku tv


©