动态给ifram添加内容,兼容ie和FF

第一次知道,还可以这样写

<iframe width=’100%’ height=’100%’ name=’boot’ id=’boot’ src=” frameborder=’0′ scrolling=’no’></iframe>
<SCRIPT   LANGUAGE=”JavaScript”>  
<!–  
var iframe = window.frames['boot'];
iframe.document.open();
iframe.document.write(‘<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>\n’);
iframe.document.write(‘<html xmlns=”http://www.w3.org/1999/xhtml”>\n’);
iframe.document.write(‘<head>\n’);
iframe.document.write(‘<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ />\n’);
iframe.document.write(‘</head>\n’);
iframe.document.write(‘<body>\n’);
iframe.document.write(‘请等待…’);
iframe.document.write(‘</body>\n’);
iframe.document.write(‘</html>\n’);
iframe.document.close();
//–>  
</SCRIPT>

Leave a Reply