HTML5的表单属性了解(仅适用于基础学习)

 <form>
   <input type="text" placeholder="请输入" autofocus="autofocus" autocomplete="off"
    <!-- autofocus自动获取焦点-->
   <!-- placeholder是提示语-->
   <!-- autocomplete是自动完成 off是关闭 on是打开 前提1,必须提交过 前提2,必须加上name属性-->
   />
   <!-- 年月日-->
  <input type="date" /><br />
  <!-- 时分秒-->
  <input type="time" /><br />
  <!-- 搜索栏-->
  搜索<input type="search" /><br />
   <!-- 网址-->
  <input type="url" /><br />
  <!-- 年月分时分秒-->
  <input type="datetime-local" /><br />
  <!-- 滑块-->
  <input type="range" /><br />
 <!-- 数量-->
  <input type="number" max="20" min="0"/><br />
  <!--电话框-->
  <input type="tel" required="required" pattern="<!-- 输入正则表达式验证-->"/><br /><!-- required设置输入框不能为空 -->
  <input type="submit"value="提交" /><input type="reset" value="重置" />
  <!--按钮-->
  <input type="button" />
  <!--复选框 -->
   <!-- checked为默认选中状态 适用于多选框和复选框 -->
  <input type="checkbox" checked="checked"/>
  <!--拾色器 -->
  <input type="color" />
  <!--复选框 -->
  <!--multiple可以用于邮件和文件复合上传 -->
  <input type="email" multiple="multiple" />
  <!--隐藏框 -->
  <input type="hidden" />
  <!--图片-->
  <input type="image" />
  <!--密码框-->
  <input type="password" />
  <!--星期-->
  <input type="week" />
  <!--月份-->
  <input type="month" />
  
  </form>

posted @ 2020-06-09 16:00  少熬夜植发很贵  阅读(24)  评论(0)    收藏  举报