
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OS机小票打印</title>
<script type="text/javascript">
function doPrint(how)
{
//打印文档对象9
var myDoc ={ 
settings:{
paperWidth:800,
paperHeight:"auto" // 小票打印,高度自动        
},
marginIgnored:true, 
documents: document, 
copyrights : '杰创软件拥有版权 www.jatools.com' 
};
var jatoolsPrinter = getJatoolsPrinter();        
if(how == '打印预览...')
jatoolsPrinter.printPreview(myDoc ); // 打印预览
else if(how == '打印...')
jatoolsPrinter.print(myDoc ,true); // 打印前弹出打印设置对话框
else
jatoolsPrinter.print(myDoc ,false); // 不弹出对话框打印
}
function getJatoolsPrinter(){
        return navigator.userAgent.match(/(msie\s|trident.*rv([\w.]+)/i)?document.getElementById('ojatoolsPrinter'): document.getElementById('ejatoolsPrinter');
}
</script>
</head>
<body>
<div id="page1">购物清单,略......</div>
<input type="button" value="打印预览..." onClick="doPrint('打印预览...')">
<input type="button" value="打印..." onClick="doPrint('打印...')">
<input type="button" value="打印" onClick="doPrint('打印')"></p>
<!-- 插入打印控件 -->
<object id="ojatoolsPrinter" codebase="jatoolsPrinter.cab#version=5,4,0,0"
classid="clsid:B43D3361-D075-4BE2-87FE-057188254255" width="0" height="0">
<embed id="ejatoolsPrinter" type="application/x-vnd.jatoolsPrinter"
pluginspage="jatoolsPrinter.exe" width="0" height="0"
/>
</body>
</html> 
				
			
			
	
			 图片附件:  3.png (2015-8-19 11:13, 44.56 KB) / 该附件被下载次数 9564
							图片附件:  3.png (2015-8-19 11:13, 44.56 KB) / 该附件被下载次数 9564 
						 
				
			
			
	
			 图片附件:  1.jpg (2015-8-19 11:13, 51.88 KB) / 该附件被下载次数 9551
							图片附件:  1.jpg (2015-8-19 11:13, 51.88 KB) / 该附件被下载次数 9551 
						 附件:  pos2.htm (2015-8-19 11:18, 3.69 KB) / 该附件被下载次数 13647
							附件:  pos2.htm (2015-8-19 11:18, 3.69 KB) / 该附件被下载次数 13647| 欢迎光临 杰表技术论坛 (http://bwtvl16d.jatools.com/) | Powered by Discuz! 6.1.0 |