0


歡迎光臨!! 救國團台中學苑 社會教育研習中心 電腦班隊研習營【網頁設計課程】


目錄選單語法




複選式下拉選單

 

將原始碼複製到網頁中欲呈現特效的位置

<!--語法在網頁插入的開始-->
<form name="doublecombo">
<select name="example" size="1" onChange="redirect(this.options.selectedIndex)">
<option>★認識網頁設計★</option>
<option>★網頁語法法介紹★</option>
<option>★影音動畫好好玩★</option>
</select>
<select name="stage2" size="1">
<option value="http://wssh0812.myweb.hinet.net/05/002.htm">★前言</option>
<option value="http://wssh0812.myweb.hinet.net/05/002002.htm">★基本觀念</option>
<option value="http://wssh0812.myweb.hinet.net/05/002003.htm">★html語言</option>
<option value="http://wssh0812.myweb.hinet.net/05/002004.htm">★html基本語法</option>
</select>
<input type="button" name="test" value="Go!" onClick="go()"></form>
<script language="JavaScript">
<!--
var groups=document.doublecombo.example.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)

group[i]=new Array()
group[0][0]=new Option("★前言","http://wssh0812.myweb.hinet.net/05/002.htm")
group[0][1]=new Option("★基本觀念","http://wssh0812.myweb.hinet.net/05/002002.htm")
group[0][2]=new Option("★html與語言","http://wssh0812.myweb.hinet.net/05/002003.htm")
group[0][3]=new Option("★html基本語法","http://wssh0812.myweb.hinet.net/05/002004.htm")
group[1][0]=new Option("★文字特效語法","http://wssh0812.myweb.hinet.net/05/007001.htm")
group[1][1]=new Option("★跑馬燈特效語法","http://wssh0812.myweb.hinet.net/05/007002.htm")
group[1][2]=new Option("★游標特效語法","http://wssh0812.myweb.hinet.net/05/007003.htm")
group[1][3]=new Option("★背景與圖片特效語法", "http://wssh0812.myweb.hinet.net/05/007004.htm")
group[1][4]=new Option("★超連結特效語法", "http://wssh0812.myweb.hinet.net/05/007005.htm")
group[1][5]=new Option("★視窗特效語法", "http://wssh0812.myweb.hinet.net/05/007006.htm")
group[1][6]=new Option("★目錄選單語法", "http://wssh0812.myweb.hinet.net/05/007007.htm")
group[1][7]=new Option("★計數器特效語法", "http://wssh0812.myweb.hinet.net/05/007008.htm")
group[1][8]=new Option("★動畫特效語法", "http://wssh0812.myweb.hinet.net/05/007009.htm")
group[1][9]=new Option("★其他特效語法", "http://wssh0812.myweb.hinet.net/05/007010.htm")
group[2][0]=new Option("★相片播放器","http://wssh0812.myweb.hinet.net/05/009901.htm")
group[2][1]=new Option("★影音播放器","http://wssh0812.myweb.hinet.net/05/009902.htm")
group[2][2]=new Option("★圖檔專區","http://wssh0812.myweb.hinet.net/05/009903.htm")

var temp=document.doublecombo.stage2
function redirect(x){
for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
for (i=0;i<group[x].length;i++){
temp.options[i]=new Option(group[x][i].text,group[x][i].value)
}
temp.options[0].selected=true
}
function go(){
location=temp.options[temp.selectedIndex].value
}
//-->
</script>
<!--語法在網頁插入的結束-->
 

 


上一頁下一頁 │                                      │ 回首頁 回特效語法  │