Skip to content

Instantly share code, notes, and snippets.

@lsmith
Created September 17, 2009 17:46
Show Gist options
  • Select an option

  • Save lsmith/188612 to your computer and use it in GitHub Desktop.

Select an option

Save lsmith/188612 to your computer and use it in GitHub Desktop.
document.getElementById('x').innerHTML =
'<input type="checkbox" name="foo" value="1">' +
'<input type="checkbox" name="foo" value="2">' +
'<input type="checkbox" name="foo" value="3">' +
'<input type="checkbox" name="foo" value="4">' +
'<input type="checkbox" name="foo" value="5">';
alert(document.getElementsByName('foo').length);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment