关于window.id.document.open()函数在火狐浏览器和苹果浏览器都不支持-跪求高手解决~~~ window.id.document.open() 改成 document.getElementById('ID').docuemnt.open(); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 刚才实验了一下document.getElementById("imb_Background").document has no properties[Break on this error] document.getElementById("imb_Background").document.open();提示以上的显示。 if (document.getElementById("imb_Background")==null){ document.body.innerHTML += "<iframe id=\"imb_Background\" src=\"about:blank\" style=\"position:absolute;left:0;top:0;width:0px;height:0px;visibility:hidden;\" frameborder=\"0\"></iframe>"; window.imb_Background.document.open(); window.imb_Background.document.write("<html><body bgcolor=red> sdfasdfasdf</body></html>"); window.imb_Background.document.close(); } if (document.getElementById("imb_FormModal")==null){ document.body.innerHTML += "<iframe id=\"imb_FormModal\" src=\"about:blank\" style=\"position:absolute;left:0;top:0;width:0px;height:0px;visibility:hidden;border-bottom:2px solid #999999;border-right:2px solid #999999;border-top:1px solid #F8F6C1;border-left:1px solid #F8F6C1;\" frameborder=\"0\"></iframe>"; window.imb_FormModal.document.open(); window.imb_FormModal.document.write("<html><head><style><!--"); window.imb_FormModal.document.write("td{font-size:12px;"); window.imb_FormModal.document.write("//--></style></head><body scroll=no leftmargin=0 topmargin=0>"); window.imb_FormModal.document.write("<table width=100% height=100% bgcolor=\"#eeeeee\"><tr><td align=left bgcolor=red><div id=\"imb_Title\" style=\"padding-left:3px;padding-right:3px;color:white;font-family:verdana;\">"); window.imb_FormModal.document.write("</div></td></tr><tr><td align=left><div id=\"imb_Content\" style=\"padding:7px;\">"); window.imb_FormModal.document.write("</div></td></tr><tr><td id=\"imb_Body\" align=center>"); window.imb_FormModal.document.write("</td></tr></table>"); window.imb_FormModal.document.write("</body></html>"); window.imb_FormModal.document.close(); } <body><iframe id="imb_Background" src="about:blank"></iframe></body><script type="text/javascript">var doc = document.getElementById("imb_Background").contentWindow.document;doc.open();doc.writeln('<h1>hello,world!</h1>');doc.close();</script> js实现元素固定位置的求助 prototype到底是什么?为什么要用prototype?--新手问... 关于confirm()的问题 图片自动刷新问题 如何用数字键来选择选项和提交表单 如果不同button的动作? 请问这个效果怎么做的? JS 中的空格问题 javascript中设置body的leftMargin属性, IE显示页面的时候,忽略了一些字符. 求一计算表达式的与正则! 求一正则表达式 限制英文输入
[Break on this error] document.getElementById("imb_Background").document.open();
提示以上的显示。
document.body.innerHTML += "<iframe id=\"imb_Background\" src=\"about:blank\" style=\"position:absolute;left:0;top:0;width:0px;height:0px;visibility:hidden;\" frameborder=\"0\"></iframe>";
window.imb_Background.document.open();
window.imb_Background.document.write("<html><body bgcolor=red> sdfasdfasdf</body></html>");
window.imb_Background.document.close();
}
if (document.getElementById("imb_FormModal")==null){
document.body.innerHTML += "<iframe id=\"imb_FormModal\" src=\"about:blank\" style=\"position:absolute;left:0;top:0;width:0px;height:0px;visibility:hidden;border-bottom:2px solid #999999;border-right:2px solid #999999;border-top:1px solid #F8F6C1;border-left:1px solid #F8F6C1;\" frameborder=\"0\"></iframe>";
window.imb_FormModal.document.open();
window.imb_FormModal.document.write("<html><head><style><!--");
window.imb_FormModal.document.write("td{font-size:12px;");
window.imb_FormModal.document.write("//--></style></head><body scroll=no leftmargin=0 topmargin=0>");
window.imb_FormModal.document.write("<table width=100% height=100% bgcolor=\"#eeeeee\"><tr><td align=left bgcolor=red><div id=\"imb_Title\" style=\"padding-left:3px;padding-right:3px;color:white;font-family:verdana;\">");
window.imb_FormModal.document.write("</div></td></tr><tr><td align=left><div id=\"imb_Content\" style=\"padding:7px;\">");
window.imb_FormModal.document.write("</div></td></tr><tr><td id=\"imb_Body\" align=center>");
window.imb_FormModal.document.write("</td></tr></table>");
window.imb_FormModal.document.write("</body></html>");
window.imb_FormModal.document.close();
}
<body>
<iframe id="imb_Background" src="about:blank"></iframe>
</body>
<script type="text/javascript">
var doc = document.getElementById("imb_Background").contentWindow.document;
doc.open();
doc.writeln('<h1>hello,world!</h1>');
doc.close();
</script>