当前位置:网站首页>风尚云网学习-input属性总结
风尚云网学习-input属性总结
2022-04-23 12:35:00 【风尚云网】
文章:风尚云网学习-input属性总结

input标签定义及使用说明:
<input> 标签规定了用户可以在其中输入数据的输入字段。
<input> 元素在 <form> 元素中使用,用来声明允许用户输入数据的 input 控件。
输入字段可通过多种方式改变,取决于 type 属性。
input属性/值/简介:
| 属性 | 值 | 简介 |
|---|---|---|
| accept | audio/* video/* image/* MIME_type | 规定通过文件上传来提交的文件的类型。 (只针对type="file") |
| align | left right top middle bottom | HTML5已废弃,不赞成使用。规定图像输入的对齐方式。 (只针对type="image") |
| alt | text | 定义图像输入的替代文本。 (只针对type="image") |
| autocompleteNew | on off | autocomplete 属性规定 <input> 元素输入字段是否应该启用自动完成功能。 |
| autofocusNew | autofocus | 属性规定当页面加载时 <input> 元素应该自动获得焦点。 |
| checked | checked | checked 属性规定在页面加载时应该被预先选定的 <input> 元素。 (只针对 type="checkbox" 或者 type="radio") |
| disabled | disabled | disabled 属性规定应该禁用的 <input> 元素。 |
| formNew | form_id | form 属性规定 <input> 元素所属的一个或多个表单。 |
| formactionNew | URL | 属性规定当表单提交时处理输入控件的文件的 URL。(只针对 type="submit" 和 type="image") |
| formenctypeNew | application/x-www-form-urlencoded multipart/form-data text/plain | 属性规定当表单数据提交到服务器时如何编码(只适合 type="submit" 和 type="image")。 |
| formmethodNew | get post | 定义发送表单数据到 action URL 的 HTTP 方法。 (只适合 type="submit" 和 type="image") |
| formnovalidateNew | formnovalidate | formnovalidate 属性覆盖 <form> 元素的 novalidate 属性。 |
| formtargetNew | _blank _self _parent _top framename | 规定表示提交表单后在哪里显示接收到响应的名称或关键词。(只适合 type="submit" 和 type="image") |
| heightNew | pixels | 规定 <input>元素的高度。(只针对type="image") |
| listNew | datalist_id | 属性引用 <datalist> 元素,其中包含 <input> 元素的预定义选项。 |
| maxNew | number date | 属性规定 <input> 元素的最大值。 |
| maxlength | number | 属性规定 <input> 元素中允许的最大字符数。 |
| minNew | number date | 属性规定 <input>元素的最小值。 |
| multipleNew | multiple | 属性规定允许用户输入到 <input> 元素的多个值。 |
| name | text | name 属性规定 <input> 元素的名称。 |
| patternNew | regexp | pattern 属性规定用于验证 <input> 元素的值的正则表达式。 |
| placeholderNew | text | placeholder 属性规定可描述输入 <input> 字段预期值的简短的提示信息 。 |
| readonly | readonly | readonly 属性规定输入字段是只读的。 |
| requiredNew | required | 属性规定必需在提交表单之前填写输入字段。 |
| size | number | size 属性规定以字符数计的 <input> 元素的可见宽度。 |
| src | URL | src 属性规定显示为提交按钮的图像的 URL。 (只针对 type="image") |
| stepNew | number | step 属性规定 <input> 元素的合法数字间隔。 |
| type | button按钮类型 选择一个日期和时间 (无时区)类型 |
type 属性规定要显示的 <input> 元素的类型。 |
| value | text | 指定 <input> 元素 value 的值。 |
| widthNew | pixels | width 属性规定 <input> 元素的宽度。 (只针对type="image") |
版权声明
本文为[风尚云网]所创,转载请带上原文链接,感谢
https://blog.csdn.net/zsx0806/article/details/124323409
边栏推荐
- box-sizing
- AD20补充笔记3—快捷键+持续更新
- BUUCTF WEB [GXYCTF2019]禁止套娃
- Markdown grammar learning
- 洛谷P5540 [BalkanOI2011] timeismoney | 最小乘积生成树 题解
- Try the server for one month for free, and attach the tutorial
- 宝塔面板命令行帮助教程(包含重置密码)
- Web17 -- use of El and JSTL
- Lesson 26 static member functions of classes
- uni-app 原生APP-云打包集成极光推送(JG-JPUSH)详细教程
猜你喜欢

Resolve disagrees about version of symbol device_ create

A graphic designer's fantasy world | ones characters

传统企业如何应对数字化转型?这些书给你答案

天梯赛赛前练习

Debug Jest test cases in VSCode, debug Jest test cases in VSCode, middle note basedir=$(dirname "$" (echo "$0" sed -e -e, s, \ \, / "-e").

在 VSCode 中调试 Jest 的测试用例,VSCode调试Jest测试用例报错basedir=$(dirname “$(echo “$0“ | sed -e ‘s,\\,/,g‘)“)解决

网络信息安全之零信任

leetcode:437. 路径总和 III【dfs 选还是不选?】

How do programmers finalize nucleic acid statistics with 130 lines of code

宝塔面板命令行帮助教程(包含重置密码)
随机推荐
Resolve disagrees about version of symbol device_ create
洛谷P5540 [BalkanOI2011] timeismoney | 最小乘积生成树 题解
程序员如何用130行代码敲定核酸统计
实现一个盒子在父盒子中水平垂直居中的几种“姿势”
消息队列概述
I changed to a programmer at the age of 31. Now I'm 34. Let me talk about my experience and some feelings
在 VSCode 中调试 Jest 的测试用例,VSCode调试Jest测试用例报错basedir=$(dirname “$(echo “$0“ | sed -e ‘s,\\,/,g‘)“)解决
为什么要有包装类,顺便说一说基本数据类型、包装类、String类该如何转换?
0基础可以考CPDA数据分析师证书吗
智能多线弹性云增加独立的IP地址,如何实现多线功能?
Stm32cubeprogrammer basic instructions
NBIOT的AT指令
IDEA设置版权信息
Hard core parsing promise object (do you know these seven common APIs and seven key questions?)
leetcode:437. 路径总和 III【dfs 选还是不选?】
Please help me see what this is, mysql5 5. Thanks
The database navigator uses the default MySQL connection prompt: the server time zone value 'Ö Ð¹ ú±ê ×¼ ʱ ¼ ä’ is unrecognized or repres
硬核解析Promise对象(这七个必会的常用API和七个关键问题你都了解吗?)
box-sizing
STM32CubeProgrammer基础使用说明