日期:2014-05-16  浏览次数:20736 次

web打印控制如何实现横向或纵向,请帮忙看一下。
<SCRIPT language=javascript>     
var HKEY_Root,HKEY_Path,HKEY_Key;      
HKEY_Root="HKEY_CURRENT_USER";      
HKEY_Path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";      
var head,foot,top,bottom,left,right;     
    
//取得页面打印设置的原参数数据     
function PageSetup_Null()      
{      
 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,"");      
  HKEY_Key="margin_bottom";      
//设置下页边距(0)     
  Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0.2");      
  HKEY_Key="margin_left";      
//设置左页边距(0)     
  Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0.35");      
  HKEY_Key="margin_right";      
//设置右页边距(0)     
  Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0.2");      
  HKEY_Key="margin_top";      
//设置上页边距(8)     
  Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0.3");      
 }      
 catch(e){     
    alert("不允许ActiveX控件");     
}      
}     
</script>
请问如何加入横幅向或纵向打印,请指教一下,在此谢了!

------解决方案--------------------
本帖最后由 net_lover 于 2013-05-25 10:33:26 编辑