title: Difference between onClick() and onChange() for radio buttons
body: <pre><code>&lt;input type=&quot;radio&quot; name=&quot;group&quot; value=&quot;book_folder&quot; onchange=&quot;makeRadioButtons()&quot;&gt;Create New Book&lt;/input&gt;
  
  &lt;input type=&quot;radio&quot; name=&quot;group&quot; value=&quot;book_chapter&quot; onchange=&quot;makeCheckBoxes()&quot;&gt;Create New Chapter&lt;/input&gt;
  </code></pre>
  <p>I was using the above code and when I clicked the second radio button, I thought I should get two events, one from the button that got unchecked and other from the button that got checked, because logically speaking, both buttons got their state changed, and I have bound the <code>onchange()</code> event not the <code>onclick()</code> event. But as it seems I only get one event from the button that just got checked. Is this a desired behaviour in HTML? How can I get an event from the button if it got unchecked?</p>