title: Can you add parameters inside a print() function in javascript
body: <p>I am looking for a way to add parameters on a print function, because I have to print only the table and when I alert the table it shows me the correct value but when I'm printing it prints the entire page.</p>
  
  <p>My code is </p>
  
  <pre><code>aa = document.getElementById('tablename').innerHTML
  </code></pre>
  
  <p>If I <code>alert(aa)</code> it gives me the write value
  then I <code>print(aa)</code> it give me the entire page.
  so I tried <code>print(aa)</code> and <code>aa.print</code> and it doesn't work.</p>
  
  <p>Does anyone know the solution for this?</p>