The HTML 5 standard form label requires an identifier to associate the label with input .
<form> <label for="male">Male</label> <input type="radio" id="male"/> <label for="female">Female</label> <input type="radio" id="female"/> </form>
As most JS developers know, using globals leak identifiers - in this case window.male and window.female are created.
window.male
window.female
How to use form shortcuts without creating global tables?
use another way:
<form> <label>Male <input type="radio"></label> <label>Female <input type="radio"></label> </form>