首先,你的浏览器必须是ie6.。。*@(%……*(……%(
http://download.csdn.net/source/1295608
然后请下载此资源
再接着打开里面的demo.html
最后鼠标移动到菜单上,发现了没?旁边的下拉框会消失
但是在ie7或者是ff上则没有这个问题
help~
但是又不能和用户说,ie6这么垃圾的浏览器你别用了,换吧
所以还请各位多多帮助
http://download.csdn.net/source/1295608
然后请下载此资源
再接着打开里面的demo.html
最后鼠标移动到菜单上,发现了没?旁边的下拉框会消失
但是在ie7或者是ff上则没有这个问题
help~
但是又不能和用户说,ie6这么垃圾的浏览器你别用了,换吧
所以还请各位多多帮助
然后下面的消失?IE6测试可以啊
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
</body>
</html>有人不喜欢这么写,那么就遵照IE自己指定的标准。
我问的是如何让他不消失
把这句去掉就行了但在IE6下会造成 select 始终置顶的问题
既 select 会显示在弹出菜单前面
(把 select 的内容设置长一点就可以看见)
除了 select ,好象还有个控件也存在这问题,忘了是哪一个了
//alert(dir)
if (header._istoplevel){
var scrollY=window.pageYOffset? window.pageYOffset : this.standardbody.scrollTop
var topgap=header._offsets.top-scrollY
var bottomgap=scrollY+this.docheight-header._offsets.top-header._dimensions.h
if (topgap>0){
this.shimmy.topshim.style.left=scrollX+"px"
this.shimmy.topshim.style.top=scrollY+"px"
this.shimmy.topshim.style.width="99%"
//this.shimmy.topshim.style.height=topgap+"px" //distance from top window edge to top of menu item
}
if (bottomgap>0){
this.shimmy.bottomshim.style.left=scrollX+"px"
this.shimmy.bottomshim.style.top=header._offsets.top + header._dimensions.h +"px"
this.shimmy.bottomshim.style.width="99%"
//this.shimmy.bottomshim.style.height=bottomgap+"px" //distance from bottom of menu item to bottom window edge
}
}
},
var bottomgap=scrollY+this.docheight-header._offsets.top-header._dimensions.h
alert(topgap)
alert(bottomgap)你检测这2个值就知道了
IE6下是:58和602
FF是:59和493
说是因为他们都是windowed element 元素,而其他诸如text,textarea之类的都是windowless element 元素,所以才会有问题,但是,我不知道他们有什么关系也不懂ie和ff有什么可比性以后有时间再研究下吧。
谢谢两位了
sd5816690和chinmo