MDN self-hosted library · e01.org

HTMLFormControlsCollection: namedItem() method

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<form>
  <label for="yes">Yes</label>
  <input id="yes" name="my-radio" type="radio" />
  <label for="no">No</label>
  <input id="no" name="my-radio" type="radio" />
  <label for="maybe">Maybe</label>
  <input id="maybe" name="my-radio" type="radio" />
  <br />
  <label for="checkbox1">Checkbox</label>
  <input id="checkbox1" name="my-form-control" type="checkbox" />
</form>

<div id="output"></div>