title: how to change value of a button on click
body: <p>I am trying to change the value of a button when onclick. so far I am able to get that working but i would like it to change back to the original value when click again. any suggestions?</p>
  
  <p>my code:</p>
  
  <pre><code>{if $activity_count &gt; "0"}
  &lt;input onclick="change()" type="button" class="rbutton" value="Show/Hide" id="show_act" /&gt;
  
  {literal}
    &lt;script&gt;
     function change()
   {
    document.getElementById("show_act").value="Hide/Show"; 
  
  }
   &lt;/script&gt;
  {/literal}
  
  {else}
        {/if}
  </code></pre>