Home  >  Article  >  Web Front-end  >  HTML CSS之FORM_html/css_WEB-ITnose

HTML CSS之FORM_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 09:02:36941browse

 form 表单 常用于收集不同类用户的输入,允许用户收集:文本域(text)、下拉列表(select)、单选框(radio)、复选框(checkbox) 以及动按纽(Action)

表单标签

标签 描述
定义供用户输入的表单
定义输入域
定义文本域 (一个多行的输入控件)
定义一个控制的标签
定义域
定义域的标题
定义一个选择列表
定义选项组
定义下拉列表中的选项
定义一个按钮



     大多数表单标签都是input标签,输入类型是(type)定义的。

            例:

                

                           当需要默认值时用 value属性

                

                        (默认选中)  单选

                

                           (默认选中) 多选


            下拉列表使用到的元素为: select  属性为:option

            例:

         

                

 selected为默认选择属性

          

   

本例演示如何在数据周围绘制一个带标题的框。

健康信息

身高:

三围:

Button 按钮的三个属性

submit 该按钮是提交按钮(除了 Internet Explorer,该值是其他浏览器的默认值)。
button 该按钮是可点击的按钮(Internet Explorer 的默认值)。
reset 该按钮是重置按钮(清除表单数据)。
<form action="form_action.asp" method="get">  First name: <input type="text" name="fname" />  Last name: <input type="text" name="lname" />    <button type="submit" value="Submit">Submit</button>  <button type="reset" value="Reset">Reset</button></form>



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn