表单进阶(3)-上传文件和隐藏字段

上传文件:<input type="file">

隐藏字段:<input type="hidden" name="" id="" value="带给后端的信息">

禁用disabled:<button disabled="disabled">注册</button>

只读readonly: <input type="text" readonly value="只读">

html 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=\, initial-scale=1.0">
    <title>上传文件</title>
</head>
<body>
    <div>
        <div>请上传文件</div>
        <div>
            <!-- 上传文件 -->
            <input type="file" name="">
        </div>
    </div>

    <div>
        <div>图片按钮-代替提交按钮样式(input type="submit")</div>
        <form action="">
            <!-- 上传文件 -->
            <input type="image" src="OIP-C.jpg" >
        </form>
    </div>

    <div>
        <div>隐藏按钮</div>
        <input type="hidden" name="" id="" value="带给后端的信息">
    </div>

    <div>
        <div>禁用disabled,只读readonly</div>
        <div>
            <button disabled="disabled">注册</button>
            <br>
            <input type="radio" disabled>不满意

            <br>
            <input type="text" disabled value="11111111">
            <input type="text" readonly value="只读">
        </div>
    </div>
</body>
</html>
相关推荐
用户059540174462 分钟前
用了3年Redis,才发现我一直没搞懂缓存一致性测试
前端·css
charlie1145141918 分钟前
现代C++工程实践 WeakPtr 实战(三):WeakPtrFactory 与「最后成员」惯用法
开发语言·c++·开源项目·现代c++
swipe10 分钟前
07|(前端转后全栈)为什么后端也要缓存?从前端缓存思维理解 Redis
前端·后端·全栈
IT小盘15 分钟前
05-企业项目统一接入多个大模型-适配器模式实战
前端·人工智能·适配器模式
swipe20 分钟前
06|(前端转后全栈)登录后端到底在做什么?JWT、Spring Security 和权限链路
前端·后端·全栈
海上彼尚1 小时前
Nodejs也能写Agent - 22.LangGraph篇 - 上下文工程
前端·javascript·人工智能·langchain·node.js
IT小盘1 小时前
04-大模型流式输出原理-SSE与Python实现
开发语言·网络·人工智能·python
阳光是sunny2 小时前
LangGraph实战教程:预定义状态MessagesState与AgentState
前端·人工智能·后端
不如语冰2 小时前
AI大模型入门-Python进阶-上下文管理与with语句
开发语言·数据结构·数据库·人工智能·pytorch·redis·python