jqPrint是跟據之前jPrintArea改寫的,兩者皆是jQuery的plugin,後者目前已停止提供下載了。
網頁載入jquery.js及jqprint.js後可依下面指令達成部分列印
$('#divTest1').jqprint();
利用$('#printDivId')可印出指定ID的DIV內容,如下例
<\div id="divTest1">I'll be printed.<\/div>
<\script>$('#divTest1').jqprint();<\/script>
另外,jqPrint可針對CLASS進行群組列印
參考網頁<\div id="divTest1" class="printMe">I'll be printed.<\/div>
<\div id="divTest2" class="printMe">I'll be printed too!<\/div>
<\script>$('.printMe').jqprint();<\/script>
- http://plugins.jquery.com/project/jqPrint
- http://www.recoding.it/?p=138
- http://www.recoding.it/wp-content/uploads/demos/jqprint-demo.htm
- http://www.bennadel.com/index.cfm?dax=blog:1591.view
沒有留言:
張貼留言