I have a datatable in a JSP page and a print button. On click of the print button it will open the print option dialog and print the datatable values.
Now, I have button onclick="callsubmit()"
.
javascript:
function callsubmit(){
window.print();
window.opener.document.location = window.opener.document.location.href;
window.close();
}
This function prints the whole page, but I need datatable values only.
How to write javascript for print particular values?