05
2007
05

【动网论坛7.1 sp1 修改】-弹出菜单调到最顶层(被挡住)的解决办法

修改方法:

打开inc/Main.Js,将这些代码加入Main.js的最后

var hideSelect = ""
function ie_hideSelect()
{
ie_showSelect()
var menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : "";
if(typeof(menuobj)!="object")return
if (ie4||ns6||ns4){
  var menuarea = new Array()
  menuarea["L"] = ie_x(menuobj)
  menuarea["T"] = ie_y(menuobj)
  menuarea["R"] = menuarea["L"] + menuobj.offsetWidth
  menuarea["B"] = menuarea["T"] + menuobj.offsetHeight
  selects = document.getElementsByTagName("select")
  hideSelect = ","
  for (var i = 0; i < selects.length; i++){if(selects[i].id!="floorSelect")ie_overLap(selects[i], menuarea , i)}
}
}

function ie_showSelect()
{
if(hideSelect.length<3||!ie4&&!ns6&&!ns4)return
selects = document.getElementsByTagName("select")
for (var i = 0; i < selects.length; i++)
{
  var objthestyle=(ie4||ns6)? selects[i].style : selects[i]
  if(hideSelect.indexOf(","+i+",")>0)objthestyle.visibility = "visible"
  }
hideSelect=""
}

function ie_overLap(selectobj , m , id){
var s = new Array(),keepOut = false;
var objthestyle=(ie4||ns6)? selectobj.style : selectobj
s['L'] = ie_x(selectobj)
s['T'] = ie_y(selectobj)
s['R'] = s['L'] + selectobj.offsetWidth
s['B'] = s['T'] + selectobj.offsetHeight
if (s['L'] >= m['L'] && s['L'] <= m['R'] && ((s['T'] >= m['T'] && s['T'] <= m['B']) || (s['B'] >= m['T'] && s['B'] <= m['B']))){ keepOut = true }
else if (s['R'] >= m['L'] && s['R'] <= m['R'] && ((s['T'] >= m['T'] && s['T'] <= m['B']) || (s['B'] >= m['T'] && s['B'] <= m['B']))) { keepOut = true}
else if (s['B'] >= m['T'] && s['T'] <= m['B'] && ((s['L'] >= m['L'] && s['L'] <= m['R']) || (s['R'] >= m['R'] && s['R'] <= m['R']))) { keepOut = true }
else if (m['B'] >= s['T'] && m['T'] <= s['B'] && ((m['L'] >= s['L'] && m['L'] <= s['R']) || (m['R'] >= s['R'] && m['R'] <= s['R']))) { keepOut = true }
if(keepOut){objthestyle.visibility="hidden";hideSelect+=","+id+","}
}

找到代码:
ie_dropshadow(menuobj,"#999999",3)
后面加入一行:
ie_hideSelect()
找到代码:
menuobj.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"
ie_clearshadow()
后面加入一行:
ie_showSelect()
修改完毕!

摘自:http://www.cnblogs.com/Evolution/articles/455093.html

« 上一篇: 跑跑卡丁车视频集锦... 下一篇: 动网7.1sp1版主下来菜单的... »

评论列表:

1.MrDuan  2007-05-29 18:59:02 回复该评论
我的博客上有啊
2.swy  2007-05-29 16:58:53 回复该评论
可否留个QQ?
3.MrDuan  2007-05-29 12:45:01 回复该评论
这是解决弹出菜单被挡住的方法,你说的覆盖Cookies保存时间框的问题,我没发现,不知是什么情况?
4.swy  2007-05-29 03:38:52 回复该评论
还没解决“风格”->“默认面版”覆盖cookies保存时间框的问题

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。