webex js 判断是否是ie 以及兼容性代码-CarlZeng

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="+Ma

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) {}
}

个性化需求沟通 扫客服加V加群: