CSS按钮样式之button标签与input type=button的区别详解
来源:互联网 发布:java多线程简单实例 编辑:程序博客网 时间:2024/06/10 08:50
转载文章,原文地址:http://www.cnblogs.com/PeunZhang/archive/2013/04/08/3008520.html
Buttons created with the BUTTON element function just like buttons created with the INPUT element, but they offer richer rendering possibilities: the BUTTON element may have content. For example, a BUTTON element that contains an image functions like and may resemble an INPUT element whose type is set to “image”, but the BUTTON element type allows content.
The Button Element – W3C
定义和用法
<button> 标签定义一个按钮。
在 button 元素内部,您可以放置内容,比如文本或图像。这是该元素与使用 input 元素创建的按钮之间的不同之处。
<button> 控件 与 <input type="button"> 相比,提供了更为强大的功能和更丰富的内容。<button> 与 </button> 标签之间的所有内容都是按钮的内容,其中包括任何可接受的正文内容,比如文本或多媒体内容。例如,我们可以在按钮中包括一个图像和相关的文本,用它们在按钮中创建一个吸引人的标记图像。
唯一禁止使用的元素是图像映射,因为它对鼠标和键盘敏感的动作会干扰表单按钮的行为。
请始终为按钮规定 type 属性。Internet Explorer 的默认类型是 "button",而其他浏览器中(包括 W3C 规范)的默认值是 "submit"。
释:如果在 HTML 表单中使用 button 元素,不同的浏览器会提交不同的按钮值。请使用 input 元素在 HTML 表单中创建按钮。
- CSS按钮样式之button标签与input type=button的区别详解
- <button ></button>与<input type="button" />的区别
- button标签和input type=button的区别
- HTML<button> 标签和<input type="button">的区别
- <input type="button"/>和<button></button>的区别
- html中<button>与<input type="button">区别
- <button>和<input type="button">区别
- input type="button"和button区别
- button和input type=button的区别及注意事项
- <button>和<input type="button"> 的区别
- 解析<button>和<input type="button"> 的区别
- 解析<button>和<input type="button"> 的区别
- <button>和<input type="button"> 的区别
- HTML<button>和<input type="button"> 的区别
- button和input type=button的区别及注意事项
- 解析<button>和<input type="button"> 的区别
- button和input type=button的区别及注意事项
- 解析<button>跟<input type="button"> 的区别
- 自己生成随机序列号, 便于串起来
- iOS多线程开发——GCD的使用与多线程开发浅析(二)
- Android自定义控件实现导航条IndicatorView
- 程序编译出错记录及解决方案
- js实现复选框全选/全不选/反选
- CSS按钮样式之button标签与input type=button的区别详解
- 系统调用、POSIX、C库、系统命令和内核函数
- js文档对象模型(DOM)
- 客戶端與web服務器數據交互的架構
- spring 整合shiro
- git学习——快速入门
- ANDROID HAL
- 黑马程序员——面向对象
- linux 文件系统的简单操作