一、html submit与bottom按钮基本语法结构

1、html submit按钮
在input标签里设置type="submit"即可设置此表单控件为按钮。

submit按钮代码:

<input name="" type="submit" value="提交" /> 

2、html bottom按钮
在input标签里设置type="bottom"也是即可设置此表单控件为按钮。

bottom按钮代码:

<input name="" type="button" value="提交" /> 

二、html submit与bottom按钮区别

type=button 就单纯是按钮功能 
type=submit 是发送表单

但是对于从事WEB UI的人应该要注意到,使用submit来提高页面易用性:
使用submit后,页面支持键盘enter键操作,而很多WEB软件设计师,可能没有注意到submit统一.

用button后往往页面不支持enter键了。所以需要支持enter键,必须要设置个submit,默认enter键对页面第一个submit进行操作。

<input type="submit" name="b1" value="提交" onClick="bt_submit_onclick()"> 

执行完onClick,转到action。可以自动提交不需要onClick。所以说onclick这里可以不要。

<input type="button" name="b1" value="提交" onClick="bt_submit_onclick()"> 

执行完onClick,跳转文件在 js文件里控制。提交需要onClick。

比如: 
1,onclick="form1.action='a.jsp';form1.submit();" 这样就实现了submit的功能了。

2,button代码

<form name="form1" method="post" action="http://www.divcss5.com">
<input type="button" name="Button" value="按钮" onClick="submit()">
</form>

3,按钮HTML 代码

<input type="button" name="Button" value="Button" onClick="javascript:windows.location.href="你的url""> 

三、html submit与bottom按钮美化css div布局

首先我们准备好按钮美化的按钮图片,并对input submit或bottom按钮控件内添加class样式即可,设置其按钮背景为美化图片,设置好边框为零,宽度和高度。

1、对html bottom按钮美化
1)、图片素材
可将图片另存为使用

2)、对应完整HTML源代码:

<!DOCTYPE html>
<html>
<head>
<title>button按钮美化 在线演示-www.divcss5.com</title>
<!-- www.divcss5.com -->
<style>
html{width:100%;height:100%;}
body{background:#fff;font-size:18px;font-family:"Arial", "Tahoma", "微软雅黑", "雅黑";
line-height:18px;padding:0px;margin:0px;text-align:center}
div{padding:18px}
img{border:0px;vertical-align:middle;padding:0;margin:0}
input, button{font-family:"Arial", "Tahoma", "微软雅黑", "雅黑";border:0;
vertical-align:middle;margin:8px;line-height:18px;font-size:18px}
.btn{width:140px;height:36px;line-height:18px;font-size:18px;
background:url("bg26.jpg") no-repeat left top;color:#FFF;padding-bottom:4px}
</style>
</head>
<body>
<p>
<form id="form1" name="form1" method="" action="http://www.divcss5.com/" target="_blank">
<div>
<input type="button" class="btn" value="按钮" onmouseover="this.style.backgroundPosition='left -36px'"
onmouseout="this.style.backgroundPosition='left top'" />
</div>
</form>
</p>
</body>
</html>

2、对html submit按钮美化
1)、图片素材
可将图片另存为使用

2)、对应完整HTML源代码:

<!DOCTYPE html>
<html>
<head>
<title>submit按钮美化 在线演示-www.divcss5.com</title>
<!-- www.divcss5.com -->
<style>
html { width:100%; height:100%; }
body { background:#fff; font-size:18px; font-family:"Arial", "Tahoma", "微软雅黑", "雅黑";
line-height:18px; padding:0; margin:0; text-align:center; }
div { padding:18px }
img { border:0px; vertical-align:middle; padding:0px; margin:0px; }
input, button { font-family:"Arial", "Tahoma", "微软雅黑", "雅黑"; border:0;
vertical-align:middle; margin:8px; line-height:18px; font-size:18px }
.btns { width:143px; height:40px; background:url("bg11.jpg") no-repeat left top; color:#FFF; }
</style>
</head>
<body>
<p>
<form id="form1" name="form1" method="" action="http://www.divcss5.com/" target="_blank">
<div>
<input type="submit" class="btns" onmouseover="this.style.backgroundPosition='left -40px'"
onmouseout="this.style.backgroundPosition='left top'" value="提交" />
</div>
</form>
</p>
</body>
</html>

html bottom html submit按钮表单控件与CSS美化的更多相关文章

  1. 仿苹果电脑任务栏菜单&&拼图小游戏&&模拟表单控件

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  2. 了解HTML表单之13个表单控件

    目录 传统控件 button select option optgroup textarea fieldset legend label 新增控件 datalist keygen output pro ...

  3. wicket基础应用(2)--wicket表单控件的使用

    该文可以转载,但转载必须注明作者,出处: 作者:lhx1026 出处:http://lhx1026.iteye.com/ 这一章介绍wicket表单控件的简单应用 1.Label控件 这个应该说是最常 ...

  4. 我教女朋友学编程Html系列(6)—Html常用表单控件

    做过网页的人都知道,html表单控件十分重要.基本上我们注册会员.登录用户,都需要填写用户名.密码,那些框框都是表单控件. 本来今天就想写一些常用的html表单控件,于是开始搜资料,找到了一个网页,作 ...

  5. Angular19 自定义表单控件

    1 需求 当开发者需要一个特定的表单控件时就需要自己开发一个和默认提供的表单控件用法相似的控件来作为表单控件:自定义的表单控件必须考虑模型和视图之间的数据怎么进行交互 2 官方文档 -> 点击前 ...

  6. 第九课 表单及表单控件 html5学习4

    表单有由表单域.提示文本.表单3部分构成 一.表单控件 input 控件 1.<input />单标签2.input属性: 可以通过type属性变换形状 value默认值 name名称 c ...

  7. 前端 HTML body标签相关内容 常用标签 表单标签 form 表单控件分类

    表单控件分类 input标签: input标签 type属性的text,password,button按钮,submit按钮 input标签placeholder属性 标签上显示内容 input标签 ...

  8. 表单控件 css的三中引入方式css选择器

    1. 表单控件: 单选框 如果两个单选的name值一样,会产生互斥效果 <p> <!--单选框--> 男<input type="radio" nam ...

  9. 认识HTML中表格、列表标签以及表单控件

    前端之HTML,CSS(二) HTML标签 列表标签 无序列表:闭标签,由<ul><li></li>...</ul>组合而成,效果成纵向列表.格式:&l ...

随机推荐

  1. Spring+Struts集成(第二种方案)

    在上一篇文章中我们了解到了第一种Spring跟Struts集成的方案,但此集成方案的不足是WEB层中知道Spring的相关内容,因为需要去主动的查找对象:BeanFactory.方案二便是通过依赖注入 ...

  2. CentOS6.5 安装ntopng-1.2.0

    0.准备工作 安装libpcap:最好源码安装. yum install -y libpcap* 安装redis yum install -y redis* 1.安装 tar -zxvf ntopng ...

  3. 为图片存储而作——记一次UEditor源码的修改

    本文版权归博客园和作者吴双本人共同所有.  写在前面 这是一个数据爆发的网络时代,大家习惯于浏览图文直观带给我们的快速信息.大图片的存储和浏览经常会成为Web服务器的瓶颈.试想如果你的Web服务器依然 ...

  4. 开心的金明<0-1背包>

    题意:0-1背包经典题: 不多述,直接上代码: 1.二维数组表示法: #include<cstdio> #include<iostream> #include<algor ...

  5. manecher

    #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> us ...

  6. win7 安装 vagrant + centos + virtualbox

    Vagrant 是一款用来构建虚拟开发环境的工具,非常适合 php/python/ruby/java 这类语言开发 web 应用,“代码在我机子上运行没有问题”这种说辞将成为历史. 我的是在win7系 ...

  7. JavaScript运行原理解析

    原文:1.http://blog.csdn.net/liaodehong/article/details/50488098 2.Stack的三种含义 (阮一峰) 3. http://lib.csdn. ...

  8. 【HighCharts系列教程】七、导出属性——exporting

    一.exporting属性说明 默认情况下,HighCharts支持将图表导出为图片或打印功能的.也就是在图表的右上角有两个按钮.打击即可进行相应的操作. 实现导出和打印功能需要引入相应的js文件,也 ...

  9. RMQ问题再临

    RMQ问题再临 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 终于,小Hi和小Ho踏上了回国的旅程.在飞机上,望着采购来的特产——小Hi陷入了沉思:还记得在上上周他们去 ...

  10. win10 下使用虚拟机安装ubuntu及其网络配置

    通过虚拟机安装ubuntu 我的机器是64位的win10系统,使用的虚拟机VMware workstation 12 pro 安装的是ubuntu 14.04, 网上教程很多,很详细也有有效 win1 ...