2021/3/15 get和post的区别
<!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="http://www.baidu.com" method="get">
<p>
<input type="text" name="login">
</p>
<p>
<input type="password" name="pwd">
</p>
<p>
<input type="submit">
</p>
</form>
<form action="http://www.baidu.com" method="post">
<p>
<input type="text" name="login">
</p>
<p>
<input type="password" name="pwd">
</p>
<p>
<input type="submit">
</p>
</form>
</body>
</html>
- get请求通常表示获取数据
- post请求通常表示提交数据
- get请求发送的数据都写在地址栏上,用户可见
- post请求发送的数据用户不可见
- get请求不能提交大量数据,但post可以,因此不要混用