项目中要做打印想起来以前用的jeecg中有打印的功能 直接去copy 发现用的是jquery的控件
控件 jquery.jqprint 下载路径 http://www.jq22.com/jquery-info347
将控件引入页面中
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/jquery.jqprint-0.3.js"></script>
<script>
function printall(){
$(".printDiv").jqprint();
}
function printview(){
document.all.WebBrowser1.ExecWB(7,2);
}
</script>
<div class="printDiv">
xxxxxxxxxxxxxxxxxxxxx0
</div>
一切ok了 so easy 妈妈再也不用担心我的打印了