网页打印时如何去掉页眉和页脚,急!!急!!急!!急!! 用javascript控制的话,去asp 和 javascript板块搜索。。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果只能用javascript那只能用window.print,但是window.print不能控制打印样式,只能手动设置ie的打印属性如果可以用activex的话就比较容易了,网上关于ActiveX:IEWebBrowser的execWB的文章多的是,你google一下了 <script language="JavaScript">var hkey_root,hkey_path,hkey_keyhkey_root="HKEY_CURRENT_USER"hkey_path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\"//设置网页打印的页眉页脚为空function pagesetup_null(){ try{ var RegWsh = new ActiveXObject("WScript.Shell") hkey_key="header" RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"") hkey_key="footer" RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"") }catch(e){}}//设置网页打印的页眉页脚为默认值function pagesetup_default(){ try{ var RegWsh = new ActiveXObject("WScript.Shell") hkey_key="header" RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"&w&b页码,&p/&P") hkey_key="footer" RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"&u&b&d") }catch(e){}}</script> 在浏览器里设置不要随便使用activex。 嗯.太复杂了吧.我有一个简单的方法.把网页复制 然后到word Paste 然后编辑再打印. session无法传值 gd库图像输出与echo问题 应聘的试题 本地虚拟环境一次最多能运行多个php页面? 麻烦各位,这个功能能实现吗? php url重写的问题? php的php.ini配置问题 我要用php实现一个复杂的表单提交想请各位大侠帮助。 我想用正则调取天气网中一段代码,老是获取不到! 前端小白请教php方面页面无法访问问题 PHP+MYSQL处理百万级的数据量顶得住吗? mysql数据库,密码用md5加密,select * from user_tab where u_tel='$138' and password=md5('$88')怎么报错?
如果可以用activex的话就比较容易了,网上关于ActiveX:IEWebBrowser的execWB的文章多的是,你google一下了
var hkey_root,hkey_path,hkey_key
hkey_root="HKEY_CURRENT_USER"
hkey_path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\"
//设置网页打印的页眉页脚为空
function pagesetup_null()
{
try{
var RegWsh = new ActiveXObject("WScript.Shell")
hkey_key="header"
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"")
hkey_key="footer"
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"")
}catch(e){}
}
//设置网页打印的页眉页脚为默认值
function pagesetup_default()
{
try{
var RegWsh = new ActiveXObject("WScript.Shell")
hkey_key="header"
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"&w&b页码,&p/&P")
hkey_key="footer"
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"&u&b&d")
}catch(e){}
}
</script>
不要随便使用activex。