HTML——表单

案例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form action="" method="get">
        姓名:<input type="text" name="username">
        <br>
        密码:<input type="password" name="psw">
        <br>
        <input type="submit" value="提交">
    </form>
</body>
</html>

知识点

<form action="" method=""></form>

表单标签form;

action是将来要提交的地址,默认是当前页面;

method有两种方式,分别是get和post,其中get可以使提交的内容在url显示,而post不行。

<form action="" method="get"></form>
<form action="" method="post"></form>

相关推荐

  1. HTML

    2024-03-26 17:50:02       38 阅读
  2. HTML

    2024-03-26 17:50:02       36 阅读
  3. HTML 标签

    2024-03-26 17:50:02       36 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-26 17:50:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-26 17:50:02       106 阅读
  3. 在Django里面运行非项目文件

    2024-03-26 17:50:02       87 阅读
  4. Python语言-面向对象

    2024-03-26 17:50:02       96 阅读

热门阅读

  1. Rabbit Mq 当HTTP请求一样进行接口通讯

    2024-03-26 17:50:02       41 阅读
  2. Spring Cloud Gateway 3.x 获取body中的数据鉴权

    2024-03-26 17:50:02       42 阅读
  3. 自动驾驶的几种名词

    2024-03-26 17:50:02       39 阅读
  4. 深入探索Vue.js组件与插件技术

    2024-03-26 17:50:02       36 阅读
  5. springboot项目之间的feign调用

    2024-03-26 17:50:02       39 阅读
  6. Rust 实战练习 - 5. 多线程,多进程,协程

    2024-03-26 17:50:02       38 阅读