---
title: "html的表单"
author: "angowang"
date: "2014-05-30T10:46:48Z"
tags: []
categories: ["Web前端"]
slug: "html"
draft: false
lastmod: "2014-05-30T10:46:48Z"
id: 2072869
url: "https://angowang.iteye.com/blog/2072869"
---

html的表单标签form用于包含要提交到服务器的表单域信息，它常以如下的形式出现：

```
<form action="xxx" method="xxx">
    <label for="xxx"></label><input type="text" name="xxx" id="xxx" />
</form>
```

 需要注意的有：

1. 需要发送到服务器的字段必须有name="xxx";
2. for="xxx"的"xxx"对应id="xxx"的"xxx"。