<form>
<label for ="male">男</label>
<input type="radio" name="gender" id="female" />
<br />
<label for="female">女</label>
<input type="radio" name="gender" id="female" />
</form>
<form>
男<input type="radio" name="gender"/>
<br />
女<input type="radio" name="gender" />
</form>
每一块的for和id必须一致
<label for ="male">男</label>
<input type="radio" name="gender" id="male" />
你这样写只能选到女
id不能一样