最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

js實現(xiàn)帶有介紹的Select列表菜單實例

 更新時間:2015年08月18日 16:28:36   作者:企鵝  
這篇文章主要介紹了js實現(xiàn)帶有介紹的Select列表菜單,涉及javascript頁面元素的動態(tài)操作技巧,具有一定參考借鑒價值,需要的朋友可以參考下

本文實例講述了js實現(xiàn)帶有介紹的Select列表菜單。分享給大家供大家參考。具體如下:

帶有介紹的Select列表菜單特效代碼,并不是導(dǎo)航菜單,這是表單中常用的下拉列表菜單,里面定義的菜單名稱和鏈接都可以自己修改,不同的是添加了一個說明功能,鼠標(biāo)點擊列表中內(nèi)容的時候,會浮動出本條內(nèi)容的介紹,另外文本框內(nèi)的內(nèi)容也會跟著改變。

運行效果截圖如下:

在線演示地址如下:

http://demo.jb51.net/js/2015/js-info-select-menu-codes/

具體代碼如下:

<html>
<head>
<title>帶有說明的導(dǎo)航欄</title>
</head>
<body>
<script language="JavaScript"> 
<!--
function herfto(){
  if (document.stationform.refsel.options[0].selected){ //根據(jù)用戶選定的項目
    window.location.href = "http://m.fzitv.net";} //改變本窗口的地址
  else if (document.stationform.refsel.options[1].selected)
  {  window.location.;}
  else if (document.stationform.refsel.options[2].selected)    
  {  window.location.;} 
  else if (document.stationform.refsel.options[3].selected)    
  {  window.location.;} 
  else if (document.stationform.refsel.options[4].selected)    
  {  window.location.;} 
  else if (document.stationform.refsel.options[5].selected)    
  {  window.location.;}  
  else if (document.stationform.refsel.options[6].selected)    
  {  window.location.;} 
 //根據(jù)可選條目,這里應(yīng)該相應(yīng)的增減。
  return true; 
  }
function textValue(){ 
  var stationInteger, stationString  
  stationInteger=document.stationform.refsel.selectedIndex //取得選定項目的編號
  stationString=document.stationform.refsel.options[stationInteger].title //根據(jù)編號取得相應(yīng)說明
  document.stationform.stationtext.value = stationString } //將說明顯示出來
//-->
</script>
<form name="stationform">
<select name="refsel" onChange="textValue()" multiple size="5">
<option title="一個提供優(yōu)質(zhì)腳本代碼的網(wǎng)站">腳本之家
<option title="相當(dāng)不錯的虛擬社區(qū)">新浪sina
<option title="不用說,要搜索來這里就對了">搜狐
<option title="提供免費個人主頁空間">網(wǎng)易163
<option title="一個優(yōu)秀的學(xué)生網(wǎng)站">世紀(jì)學(xué)苑
<option title="首創(chuàng)同學(xué)錄,中國學(xué)生的聚會場所">中國人
<option title="世界聞名的搜索巨頭">雅虎yahoo
</select>
<p>
<input type="button" name="stationbutton" value="Go!" onClick="herfto()" 
style="background-color: #FFFFFF; border: 1 solid #000000">
<p><input type="text" name="stationtext" value="" size="30" maxlength="35" style="border: 1 solid #000000">
</form>
</body>
</html>

希望本文所述對大家的javascript程序設(shè)計有所幫助。

相關(guān)文章

最新評論

苍梧县| 北川| 赤城县| 菏泽市| 苏尼特右旗| 云南省| 呼图壁县| 宁化县| 遂宁市| 浠水县| 民权县| 宜阳县| 曲阜市| 南召县| 东辽县| 德阳市| 阜阳市| 南皮县| 乐山市| 临漳县| 康定县| 龙岩市| 景谷| 东阿县| 凉城县| 仪陇县| 武乡县| 确山县| 白河县| 泰和县| 西城区| 连云港市| 特克斯县| 邵东县| 南江县| 略阳县| 泉州市| 武宁县| 康定县| 澄迈县| 化州市|