html5定制表单_动力节点Java学院整理
<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><fieldset> <legend>Vote for your favorite fruit</legend> <label for="apples"> <input type="radio" checked value="Apples" id="apples" name="fave"/> Apples </label> <label for="oranges"> <input type="radio" value="Oranges" id="oranges" name="fave"/> Oranges </label> <label for="cherries"> <input type="radio" value="Cherries" id="cherries" name="fave"/> Cherries </label> </fieldset></p> <input type="submit" value="Submit Vote"/> </form> 在chrome中的效果如下: 限定格式输入框 type属性值email、tel和url分别对应电子邮箱地址、电话号码和URL,支持的属性包括: <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="email">Email: <input type="email" placeholder="user@domain.com" id="email" name="email"/></label></p> <p><label for="tel">Tel: <input type="tel" placeholder="(xxx)-xxx-xxxx" id="tel" name="tel"/></label></p> <p><label for="url">Your homepage: <input type="url" id="url" name="url"/></label></p> <input type="submit" value="Submit Vote"/> </form> 在chrome中的效果如下: 时间和日期输入框 HTML5中新增了一些输入日期和时间的类型,包括: 日期和时间的input元素支持的额外属性包括: (编辑:威海站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |