表单

表单字符:

1:<form>**</form>主要用于提交数据。

常见用法:<form>

      <input type="...">

      </input>

     </form>

常用的表单字符:text  文本      rest重置    password密码    ridio单选    

                      button按钮     checkbox多选    submit带提交的按钮

                       image图片     hidden隐藏

HTML5里常用表单字符 :file文件     patetime时间     number数字    moth月

                                 Date日期     email邮件         search 搜索    week周

     新属性:      autofocus自动聚焦   例:<input type="text" autofocus="autfous">

                       readonly只读         例:<input type="text" readonly="readonly">

                       disabled输入控件不可用 例:<input type="text"disabled="disabled">

                        placehoider提示作用    例:<input type="text"placehoider="提示用语">

                        number 数字       例:<input type="number"name="points" min=0 max=10>

2:<button>登陆<button>

3:文本域:textarea 命名符号:name(名称可以相同,主要跟后台交互时使用)/id(唯一性,不相同)/class(名称可以相同)

例:<textarea name=""id=""cols="50"row="30">插入文本</textarea>

4:关于单选:<input type="radio" name"se">男  <<input type="radio" name"se">女 同样命名才会相互排斥,形成只能选一个。

  ps:做成点击后面名称也能选择的效果: <input type ="radio" id="1" name="sex">

                                                       <label for="1">男</label>

.                                                   <input type ="radio" id="2" name="sex">

                                                       <label for="2">女</label>

5:多项选择勾选:<input type="checkbox">文本</input>

6:多项选择下拉列表:<select name=""id="">

    (   option*选项个数)<option value="">选项</option>

                               </select>

                   

                          

原文地址:https://www.cnblogs.com/yz5253760/p/5839252.html