关于图层在 <select>后面的问题??很着急,请各位帮忙? 网易上那个是flash来的,用右键点一下就知道了。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可是就算是flash,如果放在图层里的话不一样还是在<select>的后面吗??我刚才试了呀?你说是什么原应呢??有什么方法能达到我说的要求吗? 这是不能解决的问题,除非隐藏select其实应该想的不是这个问题,而是要考虑你页面的布局,避免这种情况。 不可以吧?看这样行不行,在那个图层里入一个select,设为隐藏。还有要把图层的z-index设得高一点。Flash与Select一样,都是在最上层的,也不知谁能...如果Flash能在SELECT上面,你可以做一个透明的Flash放在图层上面。 模拟一个<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+" </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> 模拟一个<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+" </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> 只有把SELECT 也放在一个图层中,然后当哪个图层出现是隐藏这个图层 快点研究呀,我现在真 的很着急呀,我没别的方法了,拜托你了我看网易里的那个图层不知道是怎么搞的,我把原代码下来在我的本地运行,怎么图层就又到了<select>的后面去了呢? 短信回复了,你收到了吗?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+" </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> 短信回复了,你收到了吗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+" </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> 怎么响应COM组件的链接点事件 急急急 请诸位帮下忙 tcp服务器问题,回帖有分 jsp 程序错误 在线打开、编辑、保存word文档 JavaScrip 如何打开本地文件? 如何让SVG显示得快些?? 求一个带秒的日历的控件 请问document.all.ntimg与document.ntimg有区别吗?注:为<img name=ntimg>定义的引用名 vue登录进来页面没有数据,要刷新了才有!!! 在HTML文件中嵌入JSP,用来检测注册的各个项目的数据有效性,怎么做? 那位大哥可以告诉我怎么做出这样的菜单下拉效果???
我刚才试了呀?
你说是什么原应呢??有什么方法能达到我说的要求吗?
其实应该想的不是这个问题,而是要考虑你页面的布局,避免这种情况。
z-index设得高一点。Flash与Select一样,都是在最上层的,也不知谁能...如果Flash能在SELECT上面,你可以做一个透明的Flash放在
图层上面。
<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+" </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>
<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+" </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>
我看网易里的那个图层不知道是怎么搞的,我把原代码下来在我的本地运行,怎么图层就又到了<select>的后面去了呢?
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+" </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>
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+" </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>