+ -
当前位置:首页 → 问答吧 → [求助]如何让这代码兼容Firefox

[求助]如何让这代码兼容Firefox

时间:2010-06-04

来源:互联网

//显示层
  massage_box.style.left = (document.body.clientWidth - w) / 2;
    massage_box.style.top = (screen.height - h) / 2-80;
    massage_box.style.width = w+"px";
    massage_box.style.height = h+"px";
    massage_box.className = "massage_box";
var popiframe;
popiframe = '<div style="border-width:1 1 3 1; width:100%; height:100%; background:#fff; color:#666666; font-

size:12px;zIndex:1000">'
// popiframe += '<div onmousedown=MDown(massage_box) style="background:#666666; height:20px; font-family:Verdana,

Arial, Helvetica, sans-serif; font-//size:12px;color:#fff;cursor:move;padding:0 0 4px 0">'

popiframe += '<div style="background:#666666; height:20px; font-family:Verdana, Arial, Helvetica, sans-serif;

font-size:12px;color:#fff;padding:0 0 4px 0">'
popiframe += '<div style="display:inline; width:200px; position:absolute;padding:3px 0 0 5px;color:#ffffff"

id=pop_title>'+tit+'</div>'
popiframe += '<span onClick="closeWithIframe()" style="float:right; display:inline; cursorointer;padding:3px

5px 0 0;font-size:12px;color:#ffffff;">关闭 X</span>'
popiframe += '</div>'
popiframe += '<div style="padding:5px" ><iframe src="'+url+'" width="'+(w-11)+'px"  height="'+(h-36)+'px"

frameborder=0 scrolling=no></iframe></div>'
popiframe += '</div>'
    massage_box.innerHTML=popiframe;
    massage_box.style.display = "";
}
function closeWithIframe(){
    massage_box.style.display="none";
    document.body.removeChild(document.getElementById("bgDiv"));
}

document.write('<div id="massage_box" style="display:none">loading...</div>');




以上代码在FF下无法正常工作

作者: sjt0811   发布时间: 2010-06-04

相关阅读 更多