129、select框的选择导航

129select框的选择导航

脚本说明:

把如下代码加入<body>区域中

<form name="take" >

<table border="0" cellspacing="0" cellpadding="0">

    <tr>

      <td width="100%"><select name="take2" size="3" style="width:200px">

        <option selected value="http://www.7stk.com">网页特效代码</option>

        <option value="http://www.7stk.com/fine/index.htm">精彩网页分享</option>

        <option value="http://www.7stk.com/1/index06.htm">天气预报代码</option>

          </select>

 

<script>

<!--

//specify # of frames for animation (integer above 2)

var setframes=6

 

/////no need to edit below here///////////

var selected=-1

var switchit=-1

var cycle=0

 

function animate_go(){

if (cycle>=setframes){

document.take.take2.selectedIndex =selected

window.location=document.take.take2.options[document.take.take2.selectedIndex].value

return

}

switchit=(switchit==-1)? selected : -1

document.take.take2.selectedIndex =switchit

cycle++

 

setTimeout("animate_go()",100)

}

 

//-->

</script>

</td>

    </tr>

    <tr>

      <td width="100%"><div align="center"><p><input type="button"

      value="去看看>>" name="B1" onClick="selected=document.take.take2.selectedIndex;cycle=0;animate_go()"></div></td>

    </tr>

  </table>

</form>

 

 

 

Write a comment

Comments: 0