Jen-
Nov 19th 2006, 12:34 am
Does anyone know why this working copy is honoring the text in the array but not changing text color? Please let me know, thank you very much.
<SCRIPT type="text/javascript">
arr = new Array(
["<span syle='color: rgb(300,0,0)'>text1</span>"],
["<span syle='color: rgb(0,0,300)'>text2</span>"],
["<span syle='color: rgb(0,0,180);'>text3</span>"],
["text number 60"]);
function rotatetext(){
document.getElementById("arr").innerHTML = arr[new Date().getSeconds()][0];
setTimeout('rotatetext()',1000);}
</SCRIPT>
<body>
<div id="arr">
<SCRIPT type="text/javascript">rotatetext()</SCRIPT></div>
<SCRIPT type="text/javascript">
arr = new Array(
["<span syle='color: rgb(300,0,0)'>text1</span>"],
["<span syle='color: rgb(0,0,300)'>text2</span>"],
["<span syle='color: rgb(0,0,180);'>text3</span>"],
["text number 60"]);
function rotatetext(){
document.getElementById("arr").innerHTML = arr[new Date().getSeconds()][0];
setTimeout('rotatetext()',1000);}
</SCRIPT>
<body>
<div id="arr">
<SCRIPT type="text/javascript">rotatetext()</SCRIPT></div>