title: HTML - How to change button background color on OnClick event
body: <p>I have following PHP code where 4 buttons are displaying dynamically from database table. Different content is displaying on page based on clicked button.</p>
  
  <p>Now, I want to do so when I click 1st button then button bg color should be changed so visitor can know which button is pressed. When 2nd button is clicked then bg color of that button should be changed and previously clicked button (1st button in this example) should be restored with original color. </p>
  
  <p>Please let me know easiest way to do this using either CSS or Javascript. </p>
  
  <pre><code>&lt;form name="frm_list" action="toptipper.php" method="post" enctype="multipart/form-data"&gt;
  
  &lt;?php 
  while(!$rs_tab_list-&gt;eof())
  {
  ?&gt;
  
  &lt;button type="submit" name="btn_tab" value="&lt;?php print($rs_tab_list-&gt;fields("tabpkid")); ?&gt;"&gt;&lt;?php print($rs_tab_list-&gt;fields("title")); ?&gt;&lt;/button&gt;
  
  &lt;?php  
  $rs_tab_list-&gt;movenext();
  }       
  ?&gt;
  
  &lt;/form&gt;
  </code></pre>