zoukankan      html  css  js  c++  java
  • 表单元素

    form表单元素(16个)

    表单元素 input textarea  button select  h5新增(datalist  keygen output)

    input标签的输入类型 https://www.runoob.com/tags/tag-input.html

    text

    password

    hidden  :https://www.cnblogs.com/Jm-jing/articles/6979291.html

    button

    submit

    reset

    image

    radio

    checkbox

    file

    h5新增

    • color
    • date
    • datetime
    • datetime-local
    • email
    • month
    • number
    • range
    • search
    • tel
    • time
    • url
    • week
    • --------------------------------------------------------------------------------------------

    <!-- 每一个表单元素要想被提交必须加name属性 -->

      文本类:

    文本框    <input type = "text" />

    密码框    <input type = "password" />

    隐藏域    <input type = "hidden" />

    文本域    <textarea></textarea>

    按钮类:

    普通按钮  <input type = "button" value  = "text" />

    提交按钮  <input type = "submit" value = "提交" />

    重置按钮  <input type = "reset" value = "重置" />

    图片按钮  <input type = "image" />

     <button type="" name=></button>

    选择类:

    //同一个单选按钮组或者复选按钮组。name属性值要相同

    //

    <label> 标签为 input 元素定义标注(标记)。

    label 元素不会向用户呈现任何特殊效果。不过,它为鼠标用户改进了可用性。如果您在 label 元素内点击文本,就会触发此控件。就是说,当用户选择该标签时,浏览器就会自动将焦点转到和标签相关的表单控件上。

    <label> 标签的 for 属性应当与相关元素的 id 属性相同。

    <input type = "radio" value = "1" id = "ra1">

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

    <input type = "checkbox" value = "" id = ""><label  for = ""></label>

    <select>

          <option vale = "1"></option>

    </select>

    <input type = "file" />

    HTML5 增加了如下表单元素:

    • <datalist>
    • <keygen>
    • <output>

    注释:默认地,浏览器不会显示未知元素。新元素不会破坏您的页面。

  • 相关阅读:
    【LeetCode】048. Rotate Image
    【LeetCode】036. Valid Sudoku
    【LeetCode】060. Permutation Sequence
    【LeetCode】001. Two Sum
    【LeetCode】128. Longest Consecutive Sequence
    【LeetCode】081. Search in Rotated Sorted Array II
    【LeetCode】033. Search in Rotated Sorted Array
    顺时针打印矩阵
    矩形覆盖
    二维数组中的查找
  • 原文地址:https://www.cnblogs.com/cui-ting/p/11216725.html
Copyright © 2011-2022 走看看