if (shim!=null) shim.style.display = "none";
}
//Creates a new shim for the menu
function createMenuShim(menu)
{
if (menu==null) return null;
var shim = document.createElement("<iframe scrolling='no' frameborder='0'"+
"style='position:absolute; top:0px;"+
"left:0px; display:none'></iframe>");
shim.name = getShimId(menu);
shim.id = getShimId(menu);
//Unremark this line if you need your menus to be transparent for some reason
//shim.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
if (menu.offsetParent==null || menu.offsetParent.id=="")
{
window.document.body.appendChild(shim);
}
else
{
menu.offsetParent.appendChild(shim);
}
return shim;
}
//Creates an id for the shim based on the menu id
function getShimId(menu)
{
if (menu.id==null) return "__shim";
return "__shim"+menu.id;
}
//Returns the shim for a specific menu
function getShim(menu)
{
return document.getElementById(getShimId(menu));
}
2、添加好上述函数后,仍在该文件中查找到:
menuobj.thestyle.visibility="visible"
在其后增加一行:openShim(menuobj,vmenuobj)
继续查找到:
function ie_clearshadow()
{
for(var i=0;i<fo_shadows.length;i++)
{
if (fo_shadows[i])
fo_shadows[i].style.display="none"
}
fo_shadows=new Array();
}
把其改为:
function ie_clearshadow()
{
for(var i=0;i<fo_shadows.length;i++)
{
if (fo_shadows[i])
fo_shadows[i].style.display="none"
}
closeShim(window.menuobj)
fo_shadows=new Array();
}