【动网论坛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()
修改完毕!

posted @ 2006-07-20 03:55  『Jacky』  阅读(423)  评论(0编辑  收藏  举报