html经验汇总

1、点击radio的文字时,自动选中。可以在input里放置label,然后for属性关联input的id

<input type="radio" id="male" name="sex" checked="checked" /><label for="male"></label>  

<input type="radio" id="female" name="sex" /><label for="female"></label>

2、checkbox同上,也是使用lable for  

posted @ 2015-07-15 10:09  li_lzw  阅读(122)  评论(0编辑  收藏  举报