关于 <select> 永远在最上方的解决办法 可以用iframe做载体来解决这个问题,iframe是窗口级,可以挡住select 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不行 iframe 也无法放到 select 上面 你试下 iframe 可以, 看你的顺序是什么。另外还有一种做法,就是hide了所有的select to dogfish(dogfish) :你所说的顺序是怎样的顺序呢? 你说清楚点呀,我试了不行呀我把select放在一个文件里iframe过来 他还是在最上方 真的不行hide 就没用了 select要显示出来呀 只是永远在最上方 连flash都在他的下面 我觉得很影响美观 有没有一种办法象控制div的z-index属性那样控制他!? 大哥 如果你能让一个层位于 select 的上方的话,请你把代码发过来? 谢谢或者发到我邮箱 [email protected] 同意dogfish,只是要改成隐藏对应的select,我就是这么做的 CSDN文档中心有一篇文章,介绍了三种解决办法标题应该是:当层遇上SELECT <html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta name="GENERATOR" content="Microsoft FrontPage 4.0"><meta name="ProgId" content="FrontPage.Editor.Document"><title>简单菜单</title><!--提供定位函数,用iframe作载体,不会被select挡住By Fason(2003-5-21)--><style id=s>#div1{position:absolute;z-index:100;width:100;height:130;background-color:#d2e8ff;border:1 solid black;}div{cursor:hand;font-size:12px;}a{text-decoration:none;color:red;font-size:12px}</style></head><body><script>function window.onload(){var shtml=div1.innerHTML;var ifm=document.createElement("<iframe frameborder=0 marginheight=0 marginwidth=0 hspace=0 vspace=0 scrolling=no></iframe>")ifm.style.width=div1.offsetWidthifm.style.height=div1.offsetHeightifm.name=ifm.uniqueIDdiv1.innerHTML=""div1.appendChild(ifm)window.frames[ifm.name].document.write(s.outerHTML+"<body leftmargin=0 topmargin=0>"+shtml+"</body>")}function show(){with(document.all.img1){x=offsetLeft;y=offsetTop;objParent=offsetParent;while(objParent.tagName.toUpperCase()!= "BODY"){x+=objParent.offsetLeft;y+=objParent.offsetTop;objParent = objParent.offsetParent;}y+=offsetHeight-1}with(document.all.div1.style){pixelLeft=xpixelTop=yvisibility=''}}function hide(){document.all.div1.style.visibility='hidden'}</script><img id=img1 onmouseover="show()" onmouseout="hide()" src="ie.gif"><br><select ID="Select1" NAME="Select1"><option>lalsdf</option><option>lalsdf3</option><option>la3ralsdf</option></select><div id=div1 onmouseover="style.visibility=''" onmouseout="style.visibility='hidden'" style="visibility:hidden;"><div href="http://www.csdn.net" onmouseover="style.backgroundColor='highlight'" onmouseout="style.backgroundColor=''" onclick="window.open(href)">中国程序员</div><div href="http://www.sohu.com" onmouseover="style.backgroundColor='highlight'" onmouseout="style.backgroundColor=''" onclick="window.open(href)">sohu</div></div></body></html> 能盖住Select的Div(不是用Iframe/Popup作载体)http://jkisjk.spaces.live.com/blog/cns!758CACE25E89DD3B!359.entry jquery live div撑破了body,怎么处理 文本框与下拉链表的组合 刷新父页面 如何转换为保留2位小数形式? 关于正则表达式 本人一菜鸟,不懂JSP聊天室怎么做,连需要什么软件都不知道,盼高手指点! 还有比这简单的问题???~!~ 关于javascript setTimeout 时间不生效,函数生效了 如何屏蔽F3,然后调用自己的code打开窗口??? 关于文字提示!类似alt
另外还有一种做法,就是hide了所有的select
你所说的顺序是怎样的顺序呢?
有没有一种办法象控制div的z-index属性那样控制他!?
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>简单菜单</title>
<!--
提供定位函数,用iframe作载体,不会被select挡住
By Fason(2003-5-21)
-->
<style id=s>
#div1{
position:absolute;
z-index:100;
width:100;
height:130;
background-color:#d2e8ff;
border:1 solid black;
}
div{cursor:hand;font-size:12px;}
a{text-decoration:none;color:red;font-size:12px}
</style>
</head>
<body>
<script>
function window.onload(){
var shtml=div1.innerHTML;
var ifm=document.createElement("<iframe frameborder=0 marginheight=0 marginwidth=0 hspace=0 vspace=0 scrolling=no></iframe>")
ifm.style.width=div1.offsetWidth
ifm.style.height=div1.offsetHeight
ifm.name=ifm.uniqueID
div1.innerHTML=""
div1.appendChild(ifm)
window.frames[ifm.name].document.write(s.outerHTML+"<body leftmargin=0 topmargin=0>"+shtml+"</body>")
}function show(){
with(document.all.img1){
x=offsetLeft;
y=offsetTop;
objParent=offsetParent;
while(objParent.tagName.toUpperCase()!= "BODY"){
x+=objParent.offsetLeft;
y+=objParent.offsetTop;
objParent = objParent.offsetParent;
}
y+=offsetHeight-1
}
with(document.all.div1.style){
pixelLeft=x
pixelTop=y
visibility=''
}
}
function hide(){
document.all.div1.style.visibility='hidden'
}
</script>
<img id=img1 onmouseover="show()" onmouseout="hide()" src="ie.gif"><br>
<select ID="Select1" NAME="Select1">
<option>lalsdf</option><option>lalsdf3</option><option>la3ralsdf</option>
</select>
<div id=div1 onmouseover="style.visibility=''" onmouseout="style.visibility='hidden'" style="visibility:hidden;">
<div href="http://www.csdn.net" onmouseover="style.backgroundColor='highlight'" onmouseout="style.backgroundColor=''" onclick="window.open(href)">中国程序员</div>
<div href="http://www.sohu.com" onmouseover="style.backgroundColor='highlight'" onmouseout="style.backgroundColor=''" onclick="window.open(href)">sohu</div>
</div>
</body>
</html>
http://jkisjk.spaces.live.com/blog/cns!758CACE25E89DD3B!359.entry