英文解释:
html:超文本标记
head:头部
meta:元信息
charset:字符集
title:标题
body:文档主体
action:提交到的服务器地址
method:提交方式,get或post
novalidate:不验证
target:打开方式
input:输入框
type:指定输入内容的类型;默认text,单行文本框。
text:单行文本框
password:密码输入框,会以原点或星号隐藏,但是发送到服务器正常接收,只是看不到
name:接收找的是name属性值
submit:提交按钮
reset:重置按钮,清空输入框内容
button:普通按钮,默认没有行为和样式
hidden:隐藏域,表单提交时一起提交
number:数字输入框
range:活动条
value:默认值
min:最小值
max:最大值
step:步长
演示代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<form action="http://localhost/php.php" method="post">
<input type="number" name="n" value="10" min="5" max="20" step="3" />
<input type="range" name="r" value="10" min="5" max="20" step="3" />
</form>
</body>
</html>