label中的for
时间:2021-08-22 21:30:21
收藏:0
阅读:14
36.label中for属性
当点击input框才实现勾选打勾,这样用户体验并不好,此时添加for指向需要打勾的input框id,点击文字也可实现打勾效果。
<input type="checkbox" id="cb1">
<label for="cb1">男</label>
原文:https://www.cnblogs.com/ajaXJson/p/15172999.html
评论(0)