• 2020.12.05


    formtarget 属性指定一个名称或一个关键字来指明表单提交数据接收后的展示。

    The formtarget 属性覆盖 <form>元素的target属性.

    两个提交按钮的表单, 在不同窗口中显示:

    <form action="demo-form.php">
      First name: <input type="text" name="fname"><br>
      Last name: <input type="text" name="lname"><br>
      <input type="submit" value="正常提交">
      <input type="submit" formtarget="_blank"
      value="提交到一个新的页面上">
    </form>
     
     

    height 和 width 属性规定用于 image 类型的 <input> 标签的图像高度和宽度。

    height 和 width 属性只适用于 image 类型的<input> 标签。

    定义了一个图像提交按钮, 使用了 height 和 width 属性:

    <input type="image" src="img_submit.gif" alt="Submit" width="48" height="48">
     
     

    list 属性规定输入域的 datalist。datalist 是输入域的选项列表。

    在 <datalist>中预定义 <input> 值:

    <input list="browsers">

    <datalist id="browsers">
      <option value="Internet Explorer">
      <option value="Firefox">
      <option value="Chrome">
      <option value="Opera">
      <option value="Safari">
    </datalist>
     
     
     

    min、max 和 step 属性用于为包含数字或日期的 input 类型规定限定(约束)。

    min、max 和 step 属性适用于以下类型的 <input> 标签:date pickers、number 以及 range。

    <input> 元素最小值与最大值设置:

    Enter a date before 1980-01-01:
    <input type="date" name="bday" max="1979-12-31">

    Enter a date after 2000-01-01:
    <input type="date" name="bday" min="2000-01-02">

    Quantity (between 1 and 5):
    <input type="number" name="quantity" min="1" max="5">
     
     

    multiple 属性是一个 boolean 属性.

    multiple 属性规定<input> 元素中可选择多个值。

    上传多个文件:

    Select images: <input type="file" name="img" multiple>
     
     

    pattern 属性描述了一个正则表达式用于验证 <input> 元素的值。

    pattern 属性适用于以下类型的 <input> 标签: text, search, url, tel, email, 和 password.

    下面的例子显示了一个只能包含三个字母的文本域(不含数字及特殊字符):

    Country code: <input type="text" name="country_code" pattern="[A-Za-z]{3}" title="Three letter country code">
  • 相关阅读:
    Tensorflow遇到的问题
    IPAdr2023网络计算器IP Address Computer Edition 2023 download
    AtomCalcor 2022 原子计算器下载Atom Calcor Edition 2022 download
    js对手机软键盘的监听
    GDB 命令行调试之路(全 19)
    URLConnection 的陷阱 java_关于connection reset 服务器cgi
    详解KMP算法 另一种思路
    EF中提示一个或者多个验证出现错误,查看 EntityValidationErrors 详细信息的解决方法
    C#中数字日期转中文小写日期
    想要淘便宜淘白菜的请访问 http://31tj.com
  • 原文地址:https://www.cnblogs.com/SirNie/p/14178971.html
Copyright © 2020-2023  润新知