最近因工作上需求,找到了jQuery一個好用的Plugin
最主要的目的,是用來當只想列印網頁中的某個區塊,這個Plugin就會發揮到功能!
使用介紹:http://plugins.jquery.com/project/jqPrint
檔案下載:http://plugins.jquery.com/node/8069/release
CODE:
<script type="text/javascript"> $(document).ready(function(){ $(".printBox").click(function(){ $("#printBox").jqprint(); }); }); </script>
PARAMETERS
debug - Allows you to choose to make visible the iframe used for printing.
importCSS - Css links in original page will be imported into iframe.
First it searchs for media='print', if there isn't, will be imported the normal css files.
printContainer - Indicates if the original selector object must be included into the print (attention: setting it to false may breaks your css rules).
operaSupport - Indicates if the plugin must support also Opera, in that case it provides to build a temporary tab to print.