通過修改注冊表來改變打印橫打

<script language="javascript">
 function window.onload()
 {
  shell = new ActiveXObject("WScript.Shell");  
  setTimeout("shell.sendKeys('%fu')",1); //works same as alt+F+U
  setTimeout("shell.sendKeys('%a')",1); // Orientation: Select "Landscape"
  setTimeout("shell.sendKeys('{ENTER}')",1);
  }

</script>

你可能感兴趣的:(JavaScript,function,shell)