美文网首页
form表单

form表单

作者: 放飞吧自我 | 来源:发表于2017-09-04 19:09 被阅读8次

form 表单(创建一个表单区域)双标签 块级
action 提交后台地址,method 提交信息、数据的方式(�两种方式 get (不能提交安全性能高的) post )
小例子:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>表单-form</title>
<style>
input{
/**/
outline: none;
width:300px;
height:30px;
border:none;
font-size:16px;
padding:0 20px;
}
.username{
width:400px;
height:30px;
padding-left:20px;
border:1px #000 solid;
}
label,input[type="text"]{
display: block;
float:left;
}
</style>
</head>
<body>
<form action="" method="">
<div class="username">
<label for="username">用户名:</label>
<input id="username" type="text" name="username" placeholder="请输入您的用户名"/>
<span>x</span>
</div>
<div class="password">
<label for="password">密 码:</label>
<input id="password" type="password" name="password" placeholder="请输入您的密码"/>
</div>
<input type="submit" value="登录"/>
<input type="reset" value="清空"/>
</form>
</body>
</html>
type="text" 定义文本输入框
type="password" 定义密码输入框
type="submit" 定义数据、信息提交按钮
type="reset" 定义重置信息、数据按钮
name=""定义数据名称 (字段名称)
value=""定义默认值|信息
placeholder=""定义提示信息
label 关联标签 双标签

相关文章

网友评论

      本文标题:form表单

      本文链接:https://www.haomeiwen.com/subject/voqndxtx.html