title: Hide/Unhide table rows clicking on button?
body: <p>I am using the below code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function testDisplay(test) {
          if (document.getElementById("portests").value == "Hide " + test) {
              document.getElementById("portests").value = "Show " + test;
          }
          else{
              document.getElementById("portests").value = "Hide " + test;
          }
      }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type = "button" name = "Test1" id="portests" value = "test1" onclick = "testDisplay(name)"&gt;
      &lt;input type = "button" name = "Test1" id="portests1" value = "test" onclick = "testDisplay(name)"&gt;
  
      &lt;table style="width:100%" id="testing"&gt;
      &lt;tr&gt;
      &lt;th&gt;Firstname&lt;/th&gt;
      &lt;th&gt;Lastname&lt;/th&gt; 
      &lt;th&gt;Age&lt;/th&gt;
      &lt;/tr&gt;
       &lt;tr&gt;
         &lt;td&gt;Jill&lt;/td&gt;
      &lt;td&gt;Smith&lt;/td&gt;
      &lt;td&gt;50&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="test"&gt;
      &lt;td&gt;Eve&lt;/td&gt;
      &lt;td&gt;Jackson&lt;/td&gt;
      &lt;td&gt;94&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="test"&gt;
      &lt;td&gt;John&lt;/td&gt;
      &lt;td&gt;Doe&lt;/td&gt;
      &lt;td&gt;80&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="test"&gt;
      &lt;td&gt;John&lt;/td&gt;
      &lt;td&gt;Doe&lt;/td&gt;
      &lt;td&gt;80&lt;/td&gt;
     &lt;/tr&gt;
     &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>When clicking on button,How to hide/unhide the  <code>table(id="testing").rows(class="test")</code>.
  How to call two buttons using the same id value.</p>
  
  <p>Example link: <a href="http://jsfiddle.net/8B3M4/89/" rel="nofollow noreferrer">Test</a></p>
  
  <p>Thanks in advance.</p>