html form标签怎么用?
html form标签用于为用户输入创建 HTML 表单,表单可以用于向服务器传输数据。
说明:表单能够包含 input 元素,比如文本字段、复选框、单选框、提交按钮等等。表单还可以包含 button、select、option、optgroup、menus、textarea、fieldset、legend 和 label 元素。表单用于向服务器传输数据。
注释:form 元素是块级元素,其前后会产生折行。
html form标签 示例
<!DOCTYPE html> <html> <body> <form action=""> 用户名:<br> <input type="text" name="firstname" value="Mickey"> <br><br> 密码:<br> <input type="password" name="password"> <br><br> <input type="submit" value="提交"> </form> </body> </html>
输出:
Copyright © 2019- huatuo9.cn 版权所有 赣ICP备2023008801号-1
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务