案例
<!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>