※ 隨時變化的連結 ※
|
<body onload="window.startTimer()" background="jpg/01_bkg1.jpg"> <script LANGUAGE="JavaScript"> <!-- begin var startTime =null; var timerID =null; var initial =new Date(); var pos =0; var menuItem =null; function initArray() { this.length = initArray.arguments.length for (var i = 0; i < this.length; i++) { this[i+1] = initArray.arguments[i] } } function parsemenuItem(data,num) { for(var i=0;i<data.length;i++) { if(data.substring(i,i+1)=="|") break; } if (num==0) return(data.substring(0,i)); else return(data.substring(i+1,data.length)); } function startTimer() { initial = new Date(); startTime=initial.getTime(); stopTimer(); menuItem = new initArray("動力資訊網|http://powerpc.24cc.com", "奇摩站|http://www.kimo.com.tw", "Pchome|http://www.pchome.com.tw", "站長信箱|mailto:tzygeeng@ms11.hinet.net" ); showTimer(); } function stopTimer() { timerID=null; menuItem=null; //clearTimeout(timerID); } function showTimer() { pos= (pos == menuItem.length) ? 1 : pos + 1; document.forms[0].elements[0].value=parsemenuItem(menuItem[pos],0); timerID=window.setTimeout('showTimer()',1000); } function goToUrl() { //parent.welcome.location=parsemenuItem(menuItem[pos],1); this.location=parsemenuItem(menuItem[pos],1); return (false); } // end --> </script> <p align="center"> </p> <p align="center"> </p> <center> <form> <input TYPE="button" VALUE="請選擇 ? " NAME="goTo" onClick="window.goToUrl()"> </form> |