表单的应用
如果要将表单的数据提交到网站中,就需要form标签的action属性,action属性的值就是表单提交数据的网址。
同时input需要包含form标签中,并且要有一个input的类型是sumit(提交),同时input需要增加一个name属性。这样的标签才有意义存在。
想要我们的数据提交到服务器中,那么需要在input中增加name属性。
另外重置的表单是用reset类型。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>登录表单</title>
</head>
<body>
<form action="http://baidu.com" method="post">
<table border="1" cellspacing="0"width="600px">
<tbody>
<tr height="20px" align="center">
<td rowspan="4">总体信息</td>
<td colspan="2"></td>
</tr>
<tr height="20px" align="right">
<td>用户名:</td>
<td align="left"><input type="text" value="" name="user" /></td>
</tr>
<tr height="20px" align="right">
<td>密码:</td>
<td align="left"><input type="password" name="密码" id="" value="" /></td>
</tr>
<tr height="20px" align="center">
<td colspan="2">
<input type="submit" name="" id="" value="提交" />
<input type="reset" name="" id="" value="重置" />
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>