表单

表单字符:

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值