css基础学习---表单学习

来源:互联网 发布:租人软件app 编辑:程序博客网 时间:2024/06/03 16:49

表单<form>

表单用于显示、收集信息,并提交信息到服务器。

主要属性:

       action  定义表单被提交时发生的动作

       method指出表单数据提交的方式,get或者post

       enctype表单数据进行编码的fangs

       name  表单名称

常见表单控件:

<input />

       type: button, checkbox, file, hidden, image, password, radio, reset, submit, text

       value

       name

文本框:<input type=”text”> <inputtype=”password”>属性:value, maxlength, readonly

 

<label></label>

       for表示与该元素相联系的控件的ID值。

       <inputtype=”checkbox” name=”chkHid” id=”chkHid” />

       <labelfor=”chkHid”>ssssss</label>

       将文本与控件联系在一起后,单击文本的效果等同于单击控件。

 

<select></select> : 下拉选项框和滚动列表

       <select>

              name

              size   大于1则为滚动列表

              multiple  设置多选(按住ctrl键可多选)

       <option>

              value选项的值

 

<textarea></textarea>  多行文本输入框

cols

rows

readonly 

 

为控件分组

       <fieldset>  为控件分组

       <legend>  为分组指定一个标题


0 0
原创粉丝点击