A
Amy
Hello, I have an array with 60 items in it, one for every second, But
when it gets to the end of the 60 items it stops. How do I get it to
start over when it gets to the end of the array? Please let me know,
thank you very much.
arr = new Array(
["Text"],["http://www.website.com"],//to 60 items.
["Text"],["http://www.website.com"]
);
function change()
{
document.getElementById("url").href = arr[new
Date().getSeconds()-1][0];
document.getElementById("url").innerHTML = arr[new
Date().getSeconds()-2][0];
setTimeout('change()',1000);
}
when it gets to the end of the 60 items it stops. How do I get it to
start over when it gets to the end of the array? Please let me know,
thank you very much.
arr = new Array(
["Text"],["http://www.website.com"],//to 60 items.
["Text"],["http://www.website.com"]
);
function change()
{
document.getElementById("url").href = arr[new
Date().getSeconds()-1][0];
document.getElementById("url").innerHTML = arr[new
Date().getSeconds()-2][0];
setTimeout('change()',1000);
}