只需要在input后面的文字套一个label,然后加上for属性,值是对应的radio的id值
<input type='radio' id='male' name='sex' value='M'><label for='male'>男</label>
<input type='radio' id='female' name='sex' value='F'><label for='female'>女</label>
只需要在input后面的文字套一个label,然后加上for属性,值是对应的radio的id值
<input type='radio' id='male' name='sex' value='M'><label for='male'>男</label>
<input type='radio' id='female' name='sex' value='F'><label for='female'>女</label>