JavaScript Source Code 3000: Background Effects: Text Blinker
Text Blinker
JavaScript 1.2 (found in version 4.0 browsers) provides this neat effect: the text changes color every second. Now this is a great way to draw attention without using the annoying BLINK tag.
JavaScript Source Code 3000: Background Effects: Text Blinker:
Simply click inside the window below, use your cursor to highlight the
script, and copy (type Control-c or Apple-c) the script into a new file in
your text editor (such as Note Pad or Simple Text) and save (Control-s or
Apple-s). The script is yours!!!
<!-- ONE STEP TO INSTALL TEXT BLINKER:
1. Copy the coding into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the BODY of your HTML document -->
<SCRIPT LANGUAGE="JavaScript1.2">
<! >
<! >
<!-- 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"
);
if(navigator.appName == "Netscape") {
document.write('<layer id="c"><center>'+ctext+'</center></layer><br>');
}
if (navigator.appVersion.indexOf("MSIE") != -1){
document.write('<div id="c"><center>'+ctext+'</center></div>');
}
function chcolor(){
if(navigator.appName == "Netscape") {
document.c.document.write('<center><font color="'+color[x]);
document.c.document.write('">'+ctext+'</font></center>');
document.c.document.close();
}
else if (navigator.appVersion.indexOf("MSIE") != -1){
document.all.c.style.color = color[x];
}
(x < color.length-1) ? x++ : x = 0;
}
setInterval("chcolor()",1000);
// End -->
</script>
<!-- Script Size: 1.31 KB -->>
Wyszukiwarka
Podobne podstrony:
java text FieldPositionjava text CollationElementIteratorsong23 Elektryczne gitary Dzieci text tabLesson Plan 099 Text1c Eurasia domina text subLesson Plan 084 TextLesson Plan 114 Textassignments view done textLesson Plan 075 TextLesson Plan 012 TextTexttextLesson Plan 083 Texttext Xenophonbrodzik 0 05498 0 054992 011 0000708up092007 texttextwięcej podobnych podstron