复选框及单选框的选中

日常项目中,有复选框checkbox 以及单选框 radio的 问题
比如:点击文字选中 复选框 及单选框


之前都是使用了<input type=""/><label></label>

现在我们使用新的方法来实现
<label><input type="checkbox" title="英语">英语</label> 这样既可实现点击文字,选中按钮,对齐的话,可以微调vertical-align属性来对齐


<label><input type="radio" name="education" >博士生</label>
<label><input type="radio" name="education" >大学本科</label>


单选框 radio类似这样既可,需要注意的是,需要加上 name值

下载地址链接:https://files.cnblogs.com/files/leshao/%E9%80%89%E4%B8%AD.rar

原文地址:https://www.cnblogs.com/leshao/p/7498725.html