ITeye博客

IE打印记录

simple_hui · 2009-12-30 15:35 · JavaScript · 前端界面 · Web前端 · Markdown

打印时去掉下面的网址问题,打印预览界面可以打印的按钮,但是打印时不出现该按钮

function openwin() { //设置网页打印的页眉页脚为空 var HKEY_Root,HKEY_Path,HKEY_Key; HKEY_Root="HKEY_CURRENT_USER"; HKEY_Path="\Software\Microsoft\Internet Explorer\PageSetup\"; try { var Wsh=new ActiveXObject("WScript.Shell"); HKEY_Key="header"; Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,""); HKEY_Key="footer"; Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,""); } catch(e){} window.print();
}

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。