-
随处可见的表单
-
1、 一个简单的注册页面
-
2、 表单标签
-
3、 文本
-
4、 输入框
-
5、 按钮
-
6、 小结
-
7、 文本域
-
8、 下拉列表
-
强大的input标签
-
9、 单选和多选
-
10、 选择文件
-
11、 隐藏元素
-
12、 重置表单
-
13、 提交数据
-
交互
-
14、 表单与后台的交互
-
15、 提交表单
-
16、 小结
提交数据
我们在表单上填的信息很多情况下需要提交到后台。
<button>标签也具有[type]属性,在表单中,<button>(除了 在Internet Explorer中)默认行为是提交表单,与type="submit"的<input>标签一样。Internet Explorer 中<button>的默认行为是一个普通的按钮。
<button>标签[type]属性值为"reset"与<input>标签type="reset"相当。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="index.css">
<title>表单</title>
</head>
<body>
<form action="/" method="get">
<h2>input标签 -- 提交数据</h2>
<p><label for="account">账号:</label><input type="text" id="account"/></p>
<p><label for="psd">密码:</label><input type="password" id="psd"/></p>
<input type="submit" value="提交">
</form>
</body>
</html>
更多学习内容,就在码芽网http://www.mayacoder.com/lesson/index