表单语法
<form method="post" action="result.html">
<p>名字:<input name="name" type="text" > </p>
<p>密码:<input name="pass" type="password" > </p>
<p>
<input type="submit" name="Button" value="提交"/>
<input type="reset" name="Reset" value="重填“/>
</p>
</form>
method:规定如何发送表单数据,
常用值:
get :get方式提交,我们可以在url中看到我们提交的信息,不安全,但高效
post:比较安全,可以传输文件
action:表示向何处发送表单数据
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>登录注册</title>
</head>
<body>
<h1>注册</h1>
<!--表单form
action:表单提交位置,可以是网站,也可以是一个请求处理地址
method:post,get提交方式
-->
<form action="我的第一个网页.html" method="get">
<!--文本输入框:input type="text"-->
<p>名字:<input type="text"name="username"/> </p>
<!--密码框:input type="password"-->
<p>密码:<input type="password" name="userpwd"/></p>
<p>
<!--
submit:提交按钮
reset:清空按钮
-->
<input type="submit"/>
<input type="reset"/>
</p>
</form>
</body>
</html>