html5定制表单_动力节点Java学院清算
type属性为checkbox暗示复选框,支持的属性如下: <form method="post" action=":8080/form"> <p><label for="name">Name: <input value="Adam" disabled id="name" name="name"/></label></p> <p><label for="password">Password: <input type="password" placeholder="Min 6 characters" id="password" name="password"/></label></p> <p><label for="fave">Fruit: <input value="Apples" id="fave" name="fave"/></label></p> <p><label for="veggie">Are you vegetarian: <input type="checkbox" id="veggie" name="veggie"/>vegetarian</label></p> <input type="submit" value="Submit Vote"/> </form> 在chrome中的结果如下: 留意行使checkbox时,只有勾选了的复选框在提交表单时才会发送给处事器。 单选按钮组 type属性为radio的input元素可以用来天生一组单选按钮,支持的属性同checkbox。每一个radio都代表一个选项,统一组的radio行使沟通的name。单选按钮组合用于选项较少的场景。 (编辑:河北网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |