<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>打印练习</title> <mce:style media="print"><!-- .noprint { display: none } --></mce:style><style media="print" mce_bogus="1">.noprint { display: none }</style> <mce:script type="text/javascript"><!-- var now = new Date(); var time = now.toLocaleString(); time="访问时间:"+time+"<br/>"; function init() { document.getElementById("bottom").innerHTML = "realName"+time; PageSetup_Value("页脚jfkldsjflasjflsdjflsdjf"); } var HKEY_Root,HKEY_Path,HKEY_Key; HKEY_Root="HKEY_CURRENT_USER"; HKEY_Path="//Software//Microsoft//Internet Explorer//PageSetup//"; //设置网页打印的页眉页脚为空 function PageSetup_Value(str) { try { var Wsh=new ActiveXObject("WScript.Shell"); HKEY_Key="footer"; Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,str); } catch(e) {} } // --></mce:script> </head> <body οnlοad="init();"> <br/> <hr class="noprint"/> <center> <input name=Button onClick=document.all.WebBrowser.ExecWB(6,1) class="noprint" type=button value="打 印"> <input name=Button onClick=document.all.WebBrowser.ExecWB(7,1) class="noprint" type=button value="打印预览"> <input name=Button onClick=document.all.WebBrowser.ExecWB(8,1) class="noprint" type=button value="页面设置"> <input name=Button onClick=document.all.WebBrowser.ExecWB(45,1) class="noprint" type=button value="关 闭""> </center> <hr class="noprint"/> <div align="center" id="show_table" style="display:block;" mce_style="display:block;"> <table width="200" border="1"> <tr> <td>fdafsdfaf</td> <td>fdsafsdfs</td> <td>fdsa</td> </tr> <tr> <td>fdsafsdfsaf</td> <td>fdsafd</td> <td>dfsa</td> </tr> <tr> <td>fdsafasd</td> <td>fdsaf</td> <td>fdsa</td> </tr> <tr> <td>fdafsdfaf</td> <td>fdsafsdfs</td> <td>fdsa</td> </tr> </table> </div> <div align="center" id="bottom" style="display:block;" mce_style="display:block;"> </div> <OBJECT classid='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2' height='0' id='WebBrowser' width='0'></OBJECT> <br/> <hr class="noprint"/> <center> <input name=Button onClick=document.all.WebBrowser.ExecWB(6,1) class="noprint" type=button value="打 印"> <input name=Button onClick=document.all.WebBrowser.ExecWB(7,1) class="noprint" type=button value="打印预览"> <input name=Button onClick=document.all.WebBrowser.ExecWB(8,1) class="noprint" type=button value="页面设置"> <input name=Button onClick=document.all.WebBrowser.ExecWB(45,1) class="noprint" type=button value="关 闭""> </center> <hr class="noprint"/> </body> </html>