<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>12-表单样式</title>
</head>
<body>
一、表单标签
<form method="get或者post" action="向何处发送表单数据">
<input/>
A.属性 type定义输入框的类型
a)文本框 type="text" 密码框 type="password"
b)提交框 type="submit"和<button>提交按钮</button>一样
c)按钮框 type="button" 单纯的按钮
d)重置框 type="reset" 清空的效果
B.属性 placeholder 描述输入字段预期值的简短的提示信息,兼容到IE8以上。
C.属性 name必须设置,否则在提交表单时,用户在其中输入的数据不会被发送给服务器
D.属性 value
</form>
</body>
</html>
0009-表单
最新推荐文章于 2024-08-18 21:08:41 发布
本文介绍了HTML中表单的基本使用,包括不同类型的输入框如text、password、submit、reset,以及属性如placeholder、name和value的作用。通过示例展示了如何创建和定制表单样式,强调了name属性在数据提交时的重要性。
摘要由CSDN通过智能技术生成