zoukankan      html  css  js  c++  java
  • 【HTML5】input元素type属性值

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4     <meta charset="utf-8">
     5     <title></title>
     6 </head>
     7 <body>
     8     <form ><!--action="http://wwww.sogou.com" target="_blank"-->
     9         用户名<input type="text" autocomplete="off" name="name" placeholder="请输入用户名" maxlength="5"><!--aotufocus自动获得焦点。autocomplete为浏览器记忆功能,默认为on-->
    10         密码<input  type="password"  tabindex="1" name="password" name="默认密码"><!--tabindex为按tab键时获取焦点指定顺序,作用不大。-->
    11         <input type="radio" checked="" name="radio">
    12         <input type="submit" value="确定">
    13         <input type="reset" value="重搞">
    14         <input type="button" value="这是普通按钮">
    15         <input type="image" src="img/花1.jpg" width="50px" height="25px">
    16         <input type="hidden" value="隐藏的内容" name="hidden">
    17         <input type="text" readonly="readonly" value="只读" name="只读">
    18         <input type="text" disabled="disabled" value="中国北京" name="禁用"><br>
    19         邮箱<input type="email" name="邮箱"><!--required="required"或required=""或requried-->
    20         网址<input type="url" name="">
    21         电话<input type="tel" accesskey="c" name=""><!--不会对内容进行验证,但有作用:在手机上光标定位后会自动切换到数字输入键盘-->
    22         <!--accesskey="c"按alt+c会快速定位到此元素-->
    23         数字范围及步长<input type="number" max="9" min="3" step="3" value="6">
    24         <input type="range" min="5" max="20" step="5" value="10" name="range">
    25         time<input type="time" name="time">
    26         week<input type="week" name="week"><br>
    27         month<input type="month" name="month">
    28         date<input type="date" name="date">
    29         datetime<input type="datetime" name="datetime">
    30         datetime-local<input type="datetime-local" name="datetime-local">
    31         color<input type="color" value="#FF0000" name="color">
    32         search<input type="search" placeholder="请输入关键字" name="search"><br>
    33         file<input type="file" accept="image/jpg" multiple name="file"><!--multiple="multiple"或multiple=""或multiple-->
    34         复选框<input type="checkbox" checked name="checkbox"><input type="checkbox" checked="" name="checkbox"><input type="checkbox" checked="checked" name="checkbox">
    35         单选按钮<input type="radio" tabindex="3" name="radio"><input type="radio" tabindex="2" checked="" name="r"><!--radio的name如果不同则不属于一组,不会有单选效果。-->
    36     </form>    
    37 </body>
    38 </html>
  • 相关阅读:
    JavaScript的数据类型和运算符总结
    html&css精华总结
    lambda表达式&map&filter&yield
    tp5.1 order函数排序无效和orderRaw自定义处理排序
    tp5.1 多对多关联,添加中间表自动时间戳
    mysql索引类型和索引方法
    a标签跨域下载文件,解决download失效问题
    js读取input[type=file]图片,并实时预览
    如何禁止浏览器自动填充
    php 一维数组的合并和去重
  • 原文地址:https://www.cnblogs.com/xiongjiawei/p/6725831.html
Copyright © 2011-2022 走看看