title: Javascript: How to check only one item in checkbox
body: <p>Please help, I failed to code the checkbox that can only checked 1 item. Any help would be appreciated. Thanks</p>
  
  <p>Html</p>
  
  <pre><code>  &lt;input type="checkbox" name="&lt;%=Name %&gt;" onClick="return checkbox(this)" &gt;
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>function checkbox(a) {
  
  var Count = 0;
  
  if (a.checked)
  {
  Count = Count + 1;
  
  }
  
  if (Count == 2)
  {
  alert('choose One Please');
      return false;
  }
  }
  </code></pre>