在css中,s ub m IT 的 意思 是提交,当点击该按钮时,会把用户信息的表单提交到远程 数据库 中;语法“ty PE ="submit"”。type属性可返回确认按钮的表单元素类型,当值为submit时,表示该按钮为确认按钮。
本教程操作环境:windows7系统、CSS3 && HT ML 5版、Dell G3 电 脑。
Submit对象代表HTML表单中的一个提交按钮(submitbutton)。在HTML表单中<input type="submit">标签每出现一次,一个Submit对象就会被创建。
在表单提交之前,触发onclick事件句柄,并且一个句柄可以通过返回false来取消表单提交。
例子
<!DOCTYPE html>
<html>
<head>
< ;m eta charset="utf-8" />
<title>document</title>
</head>
<style>
input[type="text"],
select {
width: 100%;
padding: 12px 20px;
m arg in: 8px 0;
dis play : inline-block;
border: 1px solid # ccc;
border-radius: 4px;
box -s izing: border-box;
}
input[type="submit"] {
width: 100%;
background-color: #4caf50;
color: white;
padding: 14px 20px;
mar gin : 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
div {
border-radius: 5px;
background-color: # f2 f2f2;
padding: 20px;
}
</style>
<body>
<h3>使用 CSS 来渲染 HTML 的表单元素</h3>
<div>
<form action="/action_page.php">
<label for="fn am e"> First Name</label>
<input
type="text"
id="fname"
name="firstname"
placeholder="Your name .. "
/>
<label for="lname">Last Name</label>
<input
type="text"
id="lname"
name="lastname"
placeholder="Your last name.."
/>
<label for="country">Country</label>
<select id="country" name="country">
<option value="australia">Australia</option>
<option value="canada">Canada</option>
<option value="usa">USA</option>
</select>
<input type="submit" value="Submit" />
</form>
</div>
</body>
</html>效果:
推荐学习:css视频教程
以上就是css中submit意思 是什么 的详细内容,更多请关注其它相关 文章 !
总结
以上是 为你收集整理的 css中submit意思是什么 全部内容,希望文章能够帮你解决 css中submit意思是什么 所遇到的问题。
如果觉得 网站内容还不错, 推荐好友。
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did199813