要完成此效果把如下代碼加入到區(qū)域中
<script LANGUAGE="JavaScript">
function makeArray(q){
for(i=1 ; i < q ; i++){this[i]=0}}
w=1;
howmanysites=4;
Sites = new makeArray(howmanysites);
Sites[1] = "http://www.jojoo.net|鏈接一的文字!";
Sites[2] = "http://www.2.com|鏈接二的文字!";
Sites[3] = "http://www.3.com|鏈接三的文字!";
function showSites() {
if (w > howmanysites) { w=1; };
var string=Sites[w] + "";
var split=string.indexOf("|");
var url=string.substring(0,split);
var word=string.substring(split + 1,string.length);
document.form.url.value=url;
document.form.word.value=word;
w+=1;
window.setTimeout('showSites()',5000);
}
function visitSite() {
window.location=document.form.url.value;
}
</script>
<script>
showSites();
</script>