title: Toggle text on button tag
body: <p>I have a show hide table rows feature but would now like to change my text. </p>
  
  <pre><code>&lt;script language="javascript" type="text/javascript"&gt;
  
  function HideStuff(thisname) {
      tr = document.getElementsByTagName('tr');        
      for (i = 0; i &lt; tr.length; i++) {
          if (tr[i].getAttribute('classname') == 'display:none;') {
              if (tr[i].style.display == 'none' || tr[i].style.display=='block' )  {
                  tr[i].style.display = ''; 
              }
              else {
                  tr[i].style.display = 'block'; 
              }
          }
      }
  }
  </code></pre>
  
  <p>The html is as follows...</p>
  
  <pre><code>&lt;button id="ShowHide" onclick="HideStuff('hide');&gt;Show/Hide&lt;/button&gt;
  </code></pre>
  
  <p>I want to toggle the "Show/Hide" text.  Any ideas?</p>