title: How to print the values from datatable(Arraylist) using javascript?
body: <p>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.</p>
  
  <p>Now, I have <code>button onclick="callsubmit()"</code>.</p>
  
  <p>javascript:</p>
  
  <pre><code>function callsubmit(){
      window.print();
      window.opener.document.location = window.opener.document.location.href;
      window.close();
  }
  </code></pre>
  
  <p>This function prints the whole page, but I need datatable values only.</p>
  
  <p>How to write javascript for print particular values?</p>