Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div id="wrapper">
    <form>
      <input type="radio" name="mygroup" value="1">1
      <input type="radio" name="mygroup" value="2">2
      <input type="radio" name="mygroup" value="3">3
    </form>
    <form>
      <input type="radio" name="mygroup" value="A">A 
      <input type="radio" name="mygroup" value="B">B
      <input type="radio" name="mygroup" value="C">C      
    </form>
  </div>
</body>
</html>
 
var options = document.getElementsByName('mygroup'); 
document.body.addEventListener('click', function(e) {
  if (e.target.name === 'mygroup') {
    for (var i = 0; i < options.length; i++)
      options[i].checked = false;
    e.target.checked = true;
  }
}, false);
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
webketjepro
0viewers