下拉框带翻页吗?自己做个ActiveX好了.

解决方案 »

  1.   

    net_lover(孟子E章): div模仿,有没有现成的例子看看.
      

  2.   

    <html>
    <head>
    <title>模拟下拉列表框</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <style>
    body,td,div  {font:12px 宋体}
    label        {height:19px;padding:3px 0px 0px 4px}
    .link_box    {text-align:left;cursor:default}
    .link_head   {width:100%;height:23;border:2px inset}
    .link_text   {background:#fff;padding-left:2px}
    .link_arrow0 {font:14px marlett;text-align:center;width:22;height:100%;border:2px outset;background:buttonface}
    .link_arrow1 {font:14px marlett;text-align:center;width:22;height:100%;border:1px solid buttonshadow;padding:2px 0px 0px 2px;background:buttonface}
    .link_value  {position:absolute;visibility:hidden;border:1px solid;overflow:auto;overflow-x:hidden;filter:alpha(opacity:0)}
    .link_record0{width:100%;height:20;border-top:1px solid #eee;background:#fff;color:#000;padding-left:2px}
    .link_record1{width:100%;height:20;border-top:1px solid #047;background:#058;color:#fe0;padding-left:2px}
    </style>
    <script>
    var dropShow=false
    var currentID
    function dropdown(el){
    if(dropShow){
    dropFadeOut()
    }else{
    currentID=el
    el.style.visibility="visible"
    dropFadeIn()
    }
    }
    function dropFadeIn(){//选单淡入的效果
    if(currentID.filters.alpha.opacity<100){
    currentID.filters.alpha.opacity+=20
    fadeTimer=setTimeout("dropFadeIn()",50)
    }else{
    dropShow=true
    clearTimeout(fadeTimer)
    }
    }
    function dropFadeOut(){//选单淡出的效果
    if(currentID.filters.alpha.opacity>0){
    clearTimeout(fadeTimer)
    currentID.filters.alpha.opacity-=20
    fadeTimer=setTimeout("dropFadeOut()",50)
    }else{
    dropShow=false
    currentID.style.visibility="hidden"
    }
    }
    function dropdownHide(){
    if(dropShow){
    dropFadeOut()
    dropShow=false
    }
    }
    function hiLight(el){//高亮度显示指标位置
    if(dropShow){
    for(i=0;i<el.parentElement.childNodes.length;i++){
    el.parentElement.childNodes(i).className="link_record0"
    }
    el.className="link_record1"
    }
    }
    function CheckMe(el){//替换显示内容
    el.parentElement.parentElement.childNodes(0).childNodes(0).childNodes(0).childNodes(0).childNodes(0).childNodes(0).innerHTML=el.innerHTML
    }
    document.onclick=dropdownHide
    </script> 
    </head><body bgcolor="#0099FF" text="#000000" onload="document.form1.reset()">
    <table align="center" width="100%" height="100%">
    <tr><td align="center">
    <table cellpadding=4 cellspacing=2 bgcolor=#a0a0a0 align="center"><tr>
    <td bgcolor=#ddeeff width=160>范例1 (使用于表单)</td><td bgcolor=#ddeeff width=270>范例2 (使用于超连结)</td></tr>
    <tr><td bgcolor=#e0e0e0 align=center>
    <!--// 范例 1 开始 //-->
    <table><tr><form name=form1 onsubmit="alert(city.value);return false"><td>
    <div class=link_box style="width:100px" onselectStart="return false">
    <div class=link_head onclick="dropdown(value1)">
    <table width=100% height=100% border=0 cellpadding=0 cellspacing=0><tr>
    <td><div id=text1 class=link_text><label>请选择?</label></div></td>
    <td width=22 align=right><div class=link_arrow0 onmousedown="this.className='link_arrow1'" onmouseup="this.className='link_arrow0'" onmouseout="this.className='link_arrow0'">6</div></td>
    </tr></table>
    </div>
    <div id=value1 class=link_value style="width:100%;height:100px">
    <div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>北京市</label></div>
    <div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>上海市</label></div>
    <div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>河南省</label></div>
    <div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>深圳市</label></div>
    <div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>大连市</label></div>
    <div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);document.form1.city.value=this.innerText"><label>云南省</label></div>
    </div>
    </div>
    </td><td>
    <input type="hidden" name="city" value="您尚未选择">
    <input type="submit" value="确定">
    </td></form></tr></table>
    <!--// 范例 1 结束 //-->
    </td>
    <td bgcolor=#e0e0e0 align=center>
    <!--// 范例 2 开始 //-->
    <div class=link_box style="width:250px" onselectStart="return false">
    <div class=link_head onclick="dropdown(value2)">
    <table width=100% height=100% border=0 cellpadding=0 cellspacing=0><tr>
    <td><div class=link_text><img src="http://dotnet.aspx.cc/Images/smile.gif" align="absmiddle"><label>您想要浏览哪个网站?</label></div></td>
    <td width=22 align=right><div class=link_arrow0 onmousedown="this.className='link_arrow1'" onmouseup="this.className='link_arrow0'" onmouseout="this.className='link_arrow0'">6</div></td>
    </tr></table>
    </div>
    <div id=value2 class=link_value style="width:100%;height:82px">
    <div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://lucky.myrice.com')"><img src="http://dotnet.aspx.cc/images/copyright.gif" align="absmiddle"><label>【孟宪会之精彩世界】一</label></div>
    <div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://lucky.myrice.com/')"><img src="http://dotnet.aspx.cc/images/copyright.gif"  align="absmiddle"><label>【孟宪会之精彩世界】二</label></div>
    <div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://lucky.myrice.com')"><img src="http://dotnet.aspx.cc/images/meng.gif" align="absmiddle"><label>【孟宪会之<br>精彩世界】一</label></div>
    <div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://lucky.myrice.com/')"><img src="http://dotnet.aspx.cc/images/meng.gif"  align="absmiddle"><label>【孟宪会之精彩世界】二</label></div>
    <div class=link_record0 onmouseover="hiLight(this)" onclick="CheckMe(this);window.open('http://www.sina.com.cn/')"><img src="http://dotnet.aspx.cc/images/meng.gif"   align="absmiddle"><label>新浪网</label></div></div>
    </div>
    <!--// 范例 2 结束 //-->
    </td></tr>
    </table> </body>
    </html>
      

  3.   

    给Option加个属性Title来显示Text的值