- 标签
1;<form></form>
2;<selected>
<option></option>
下拉项
</selected>
下拉菜单
3;<textarea></textarea>
文本域
css样式:
resize:none
去除文本域的拉动效果
border:none
outline:none
2.form标签属性
action
:用户提交的数据提交到的位置[指定的页面]
method
:用户的提交方式
method的值: post:传输的数据量更大更安全
get:繁殖传输的数据量更小
-
input标签的
type
属性
text
:文本框
submit
:提交按钮
reset
:重置按钮
password
密码框
radio
:单选按钮
checkbox
:多选按钮
file
:本地文件上传 -
input的其他属性
name
名称
value
:默认值
readonly
:制度
disabled
:禁用
checked
:默认选中 单选/多选
selected
:下拉项默认选中
placeholder
:显示输入消失 -
例子:
<!DOCTYPE HTML>
<html>
<head>
<title></title>
<meta charset="utf-8"/>
</head>
<body>
<h1>form 表单</h1>
<form action="" method="post">
<h2>注册</h2>
用户名:<input type="text" name=