在线求打印去掉页眉和页脚 急...
我想通过点击一个按钮把页眉和页脚去掉,而不用用户设置浏览器
我在网上一搜一大堆,全是疯狂的转帖,但貌似都不行,都是这样的
var hkey_root,hkey_path,hkey_key;
var hkey_root="HKEY_CURRENT_USER";
var 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){}
}
<input type="button" value="清空页码" onclick=pagesetup_null()>
我试的只有在桌面建个html能设置,但服务器端运行的jsp程序就不行
急 急 急...
麻烦高手猛来相助,不胜感激!