The first step:
jquery.PrintArea.js download
js reference
html quote :
javascript code:
$(document).ready(function(){
$(" #print").click(function(){
$(".my_show").printArea();
});
});
This plug-in also It provides some configurable parameters. The method used is: $(element).printArea(option).
I have never used this method myself. Please try it. Please leave a message if you have any questions.
Parameter settings:
1.mode: mode, the mode is triggered when the print button is clicked, the default is iframe, when set to popup, a new window page will be opened for printing.
2.popTitle: Set the title of the newly opened window, which is empty by default.
3.popClose: Whether to close the window after completing printing, the default is false.