- 정보공유
[JQUERY] 원하는 영역 프린트
<script src="printThis.js"></script>
<div id="targetPrint">
</div>
<script type="text/javascript">
<!--
$(document).ready(function() {
$("#btnPrint").click(function() {
$("#targetPrint").printThis({
debug: false, // show the iframe for debugging
importCSS: true, // import page CSS
importStyle: false, // import style tags
printContainer: true, // grab outer container as well as the contents of the selector
pageTitle: "", // add title to print page
removeInline: false, // remove all inline styles from print elements
printDelay: 333, // variable print delay; depending on complexity a higher value may be necessary
header: null, // prefix to html
footer: null, // postfix to html
base: false , // preserve the BASE tag, or accept a string for the URL
formValues: true, // preserve input/form values
canvas: false, // copy canvas elements (experimental)
doctypeString: "...", // enter a different doctype for older markup
removeScripts: false // remove script tags from print content
});
});
});
//-->
</script>
첨부파일
- printThis.js (12.0K) 1회 다운로드 | DATE : 2017-11-08 00:26:41