网易上那个是flash来的,用右键点一下就知道了。

解决方案 »

  1.   

    可是就算是flash,如果放在图层里的话不一样还是在<select>的后面吗??
    我刚才试了呀?
    你说是什么原应呢??有什么方法能达到我说的要求吗?
      

  2.   

    这是不能解决的问题,除非隐藏select
    其实应该想的不是这个问题,而是要考虑你页面的布局,避免这种情况。
      

  3.   

    不可以吧?看这样行不行,在那个图层里入一个select,设为隐藏。还有要把图层的
    z-index设得高一点。Flash与Select一样,都是在最上层的,也不知谁能...如果Flash能在SELECT上面,你可以做一个透明的Flash放在
    图层上面。
      

  4.   

    模拟一个
    <script>
    str="";
    mywidth=0;
    function showdiv(w)
    {
    document.all.mysel.style.display="none";
    str="<input type=text style='width:"+w+";border:1 solid #000000;' readOnly onclick=showlist() value="+document.all.mysel.options[document.all.mysel.selectedIndex].text+">";
    liststr="<table style='border:1 solid #000000;' width="+w+" cellspacing=0 celpadding=0>";
    for(i=0;i<document.all.mysel.options.length;i++)
    liststr+="<tr><td style='font-size:10pt' onmouseover=myover() onmouseout=myout() onclick=myclick("+i+")>"+document.all.mysel.options[i].text+"&nbsp;&nbsp;&nbsp;</td></tr>";
    liststr+="</table>";
    likesel.innerHTML=str;
    mywidth=w;
    }
    function showlist()
    {
    likesel.innerHTML+=liststr;
    }
    function myover()
    {
    event.srcElement.style.cursor="default";
    event.srcElement.style.color="white";
    event.srcElement.style.background="darkblue";
    }
    function myout()
    {
    event.srcElement.style.color="";
    event.srcElement.style.background="";
    }
    function myclick(j)
    {
    document.all.mysel.selectedIndex=j;
    str="<input type=text style='width:"+mywidth+";border:1 solid #000000;' readOnly onclick=showlist() value="+document.all.mysel.options[document.all.mysel.selectedIndex].text+">";
    likesel.innerHTML=str;
    }
    </script>
    <body onload="showdiv(mysel.offsetWidth)">
    <select name=mysel>
    <option value=11 selected>1111111
    <option value=12>111112
    <option value=13>1111111113
    </select>
    <div id=likesel><div>
      

  5.   

    模拟一个
    <script>
    str="";
    mywidth=0;
    function showdiv(w)
    {
    document.all.mysel.style.display="none";
    str="<input type=text style='width:"+w+";border:1 solid #000000;' readOnly onclick=showlist() value="+document.all.mysel.options[document.all.mysel.selectedIndex].text+">";
    liststr="<table style='border:1 solid #000000;' width="+w+" cellspacing=0 celpadding=0>";
    for(i=0;i<document.all.mysel.options.length;i++)
    liststr+="<tr><td style='font-size:10pt' onmouseover=myover() onmouseout=myout() onclick=myclick("+i+")>"+document.all.mysel.options[i].text+"&nbsp;&nbsp;&nbsp;</td></tr>";
    liststr+="</table>";
    likesel.innerHTML=str;
    mywidth=w;
    }
    function showlist()
    {
    likesel.innerHTML+=liststr;
    }
    function myover()
    {
    event.srcElement.style.cursor="default";
    event.srcElement.style.color="white";
    event.srcElement.style.background="darkblue";
    }
    function myout()
    {
    event.srcElement.style.color="";
    event.srcElement.style.background="";
    }
    function myclick(j)
    {
    document.all.mysel.selectedIndex=j;
    str="<input type=text style='width:"+mywidth+";border:1 solid #000000;' readOnly onclick=showlist() value="+document.all.mysel.options[document.all.mysel.selectedIndex].text+">";
    likesel.innerHTML=str;
    }
    </script>
    <body onload="showdiv(mysel.offsetWidth)">
    <select name=mysel>
    <option value=11 selected>1111111
    <option value=12>111112
    <option value=13>1111111113
    </select>
    <div id=likesel><div>
      

  6.   

    只有把SELECT 也放在一个图层中,然后当哪个图层出现是隐藏这个图层
      

  7.   

    快点研究呀,我现在真 的很着急呀,我没别的方法了,拜托你了
    我看网易里的那个图层不知道是怎么搞的,我把原代码下来在我的本地运行,怎么图层就又到了<select>的后面去了呢?
      

  8.   

    短信回复了,你收到了吗?
    sorry,上午有事去了,现在把代码稍作修改,看看,div应该是在上面了吧
    <script>
    str="";
    liststr="";
    mywidth=0;
    function showdiv(w)
    {
    document.all.mysel.style.display="none";
    str="<input type=text style='width:"+w+";border:1 solid #000000;' readOnly onclick=showlist() value="+document.all.mysel.options[document.all.mysel.selectedIndex].text+">";
    liststr="<table style='border:1 solid #000000;' width="+w+" cellspacing=0 celpadding=0>";
    for(i=0;i<document.all.mysel.options.length;i++)
    liststr+="<tr><td style='font-size:10pt' onmouseover=myover() onmouseout=myout() onclick=myclick("+i+")>"+document.all.mysel.options[i].text+"&nbsp;&nbsp;&nbsp;</td></tr>";
    liststr+="</table>";
    likesel.innerHTML=str;
    mywidth=w;
    }
    function showlist()
    {
    tempstr=likesel.innerHTML+"";
    if(tempstr.length<liststr.length)
    likesel.innerHTML+=liststr;
    }
    function myover()
    {
    event.srcElement.style.cursor="default";
    event.srcElement.style.color="white";
    event.srcElement.style.background="darkblue";
    }
    function myout()
    {
    event.srcElement.style.color="";
    event.srcElement.style.background="";
    }
    function myclick(j)
    {
    document.all.mysel.selectedIndex=j;
    str="<input type=text style='width:"+mywidth+";border:1 solid #000000;' readOnly onclick=showlist() value="+document.all.mysel.options[document.all.mysel.selectedIndex].text+">";
    likesel.innerHTML=str;
    }function menu()
    {
    mydiv.style.display="block";
    }
    </script>
    <body onload="showdiv(mysel.offsetWidth)">
    <a href="javascript:menu()">show menu</a>
    <div id=mydiv style="z-index:100;position:absolute;top:40px;left:20px;display:none;background:red">hello world!!!</div>
    <select name=mysel>
    <option value=11 selected>1111111
    <option value=12>111112
    <option value=13>1111111113
    </select>
    <div id=likesel><div>
      

  9.   

    短信回复了,你收到了吗
    sorry,上午工作很忙,现在将代码稍作修改,看看div应该在上面了吧
    <script>
    str="";
    liststr="";
    mywidth=0;
    function showdiv(w)
    {
    document.all.mysel.style.display="none";
    str="<input type=text style='width:"+w+";border:1 solid #000000;' readOnly onclick=showlist() value="+document.all.mysel.options[document.all.mysel.selectedIndex].text+">";
    liststr="<table style='border:1 solid #000000;' width="+w+" cellspacing=0 celpadding=0>";
    for(i=0;i<document.all.mysel.options.length;i++)
    liststr+="<tr><td style='font-size:10pt' onmouseover=myover() onmouseout=myout() onclick=myclick("+i+")>"+document.all.mysel.options[i].text+"&nbsp;&nbsp;&nbsp;</td></tr>";
    liststr+="</table>";
    likesel.innerHTML=str;
    mywidth=w;
    }
    function showlist()
    {
    tempstr=likesel.innerHTML+"";
    if(tempstr.length<liststr.length)
    likesel.innerHTML+=liststr;
    }
    function myover()
    {
    event.srcElement.style.cursor="default";
    event.srcElement.style.color="white";
    event.srcElement.style.background="darkblue";
    }
    function myout()
    {
    event.srcElement.style.color="";
    event.srcElement.style.background="";
    }
    function myclick(j)
    {
    document.all.mysel.selectedIndex=j;
    str="<input type=text style='width:"+mywidth+";border:1 solid #000000;' readOnly onclick=showlist() value="+document.all.mysel.options[document.all.mysel.selectedIndex].text+">";
    likesel.innerHTML=str;
    }function menu()
    {
    mydiv.style.display="block";
    }
    </script>
    <body onload="showdiv(mysel.offsetWidth)">
    <a href="javascript:menu()">show menu</a>
    <div id=mydiv style="z-index:100;position:absolute;top:40px;left:20px;display:none;background:red">hello world!!!</div>
    <select name=mysel>
    <option value=11 selected>1111111
    <option value=12>111112
    <option value=13>1111111113
    </select>
    <div id=likesel><div>