1.form表单元素的type类型:
text | 文本框 |
password | 密码(显示密文) |
radio | 单选 |
checkbox | 复选 |
button | 按钮 |
submit | 提交 |
reset | 重置 |
file | 文件 |
hidden | 隐藏 |
注:在使用submit按钮时,点击它会将表单新题提交到指定的位置,而button不能实现这一功能
2.
(1).下拉选择框:select/option
(2).文本域:textarea;
3. form表单的提交方法以及两种提交方法:
method 提交方式:
(1).get请求:信息会拼接在地址后,显示用户名的信息,不安全;
(2).post请求:信息会被打包,不会显示在地址栏,信息安全。
注:其中get请求时默认值.
4.
action: form表单的数据提交地址
5. 改变🖱指针类型:
<style>
/* 伪类选择器 */
#submit:hover{
background-color: blue;
/* 指针变成小手 */
cursor: pointer;
}
</style>
</head>
<body>
<form action="https://www.baidu.com/s">
<div class="search">
<input type="text" id="search" name="wd">
<input type="submit" id="submit" value="百度一下">
</div>
</form>
</body>
</html>