webex js 判断是否是ie 以及兼容性代码
function Logon()
{
if (navigator.userAgent.indexOf("MSIE") != -1) {
parent.frames[1].location.replace("https://totemsuite.webex.com.cn/mw0306l/mywebex/login/login.do?siteurl=icdsecurity&Rnd="+Math.random());
} else {
top.frames[1].location.replace("https://totemsuite.webex.com.cn/mw0306l/mywebex/login/login.do?siteurl=icdsecurity&Rnd="+Math.random());
}
}
如果是ie 就 parent.frames[1].
如果其他浏览器 top.frames[1]
=========================================
function showPulldownMenu() {
try {
if( !(frm=getMainFrame()) ) return;
obj=frm.document.getElementById("MoreService");
if(obj) {
var el=document.getElementById("itemTopLeft");
var x=el.offsetLeft;
while (el.offsetParent){
el=el.offsetParent;
x += el.offsetLeft;
}
if(top.frames[1].frames.length>0){
width=170;
strcols = top.frames[1].document.all.tags("FRAMESET")[0].cols;
ss = strcols.split(',');
width = parseInt(ss[0]);
x=x-width;
}
if (frm.document.documentElement && frm.document.documentElement.scrollLeft) {
obj.style.left=frm.document.documentElement.scrollLeft+x;
} else {
obj.style.left=frm.document.body.scrollLeft+x;
}
if (frm.document.documentElement && frm.document.documentElement.scrollTop) {
obj.style.posTop= frm.document.documentElement.scrollTop;
} else {
obj.style.posTop= frm.document.body.scrollTop;
}
obj.style.visibility='visible';
}
} catch(e) {}
}
function hiddenPulldownMenu() {
try {
if( !(frm=getMainFrame()) ) return;
obj=frm.document.getElementById("MoreService");
if(obj) {
obj.style.visibility='hidden';
}
} catch(e) {}
}
本文来自博客园,作者:CarlZeng,转载请注明原文链接:https://www.cnblogs.com/backuper/archive/2009/06/11/1501269.html
需求沟通链接 扫客服加群:
![](https://images.cnblogs.com/cnblogs_com/backuper/933606/o_240408031754_%E6%89%AB%E5%AE%A2%E6%9C%8D%E5%8A%A0%E7%BE%A4.png)