<%@ page language="java" contentType="text/html; charset=UTF-8"
|
pageEncoding="UTF-8"%>
|
<!DOCTYPE html >
|
<html>
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<script type="text/javascript" src="/js/jquery-1.4.4.min.js"></script>
|
<title>test print</title>
|
</head>
|
<body style="margin:0px">
|
<iframe id="printIframe" frameborder="0" scrolling="no" height="100%" style="border:0px;width: 100%;border:0px;height: 100%;diaplay:none;" src="http://dewei.onbus.cn:9002/pdf.do?Rm9ybUlEPTEyMDMwMV9mZW5SZXBvcnRJRD00ODZfZmVuZG9jY29kZT1LRDIwMTYxMDE4MDA1X2ZlbnA9NDkxMzE="></iframe>
|
<script type="text/javascript">
|
$(document).ready(function(){
|
//$("#printIframe")[0].height = document.body.clientHeight;
|
//$("#printIframe")[0].width = document.body.clientWidth;
|
//$("#printIframe")[0].src = "http://dewei.onbus.cn:9002/pdf.do?Rm9ybUlEPTEyMDMwMV9mZW5SZXBvcnRJRD00ODZfZmVuZG9jY29kZT1LRDIwMTYxMDE4MDA1X2ZlbnA9NDkxMzE="
|
$("#printIframe").height(document.documentElement.clientHeight );
|
doPrint();
|
|
});
|
//点击打印按钮,触发事件】
|
function doPrint(){
|
$("#printIframe")[0].contentWindow.print();
|
}
|
</script>
|
</body>
|
</html>
|