title: javascript selected radio
body: <p>I want to check what is the selected radio input.</p>
  
  <p>here is my code.</p>
  
  <pre><code>&lt;input name="u_type" type="radio" value="staff" id="u_type" checked="checked" /&gt; Staff
  &lt;input name="u_type" type="radio" value="admin" id="u_type" /&gt; Admin
  &lt;input id="add_user" name="add_user" type="button" onclick="addUser();"  value="Add" class="submitButton admin_add" /&gt;
  
  function addUser()
  {
  //how to check what is the selected radio input
  }
  </code></pre>
  
  <p>thanks.</p>