[求助]如何让这代码兼容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; cursor
ointer;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下无法正常工作
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; cursor

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
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28