HTML DOM Button Object
来源:互联网 发布:仿淘宝商城源码html 编辑:程序博客网 时间:2024/05/20 18:17
Button Object
The Button object represents a push button.
For each <button> tag in an HTML document, a Button object is created.
Inside an HTML button element you can put content, like text or images. This is the difference between this element and buttons created with the input element.
Button Object Properties
W3C: W3C Standard.
Standard Properties, Methods, and Events
The Button object also supports the standard properties, methods, and events.
Button type Property
Button ObjectDefinition and Usage
The type property sets or returns the type of a button.
Tip: Always specify the type attribute for the button. The default type for Internet Explorer is "button", while in other browsers (and in the W3C specification) it is "submit".
Syntax
buttonObject.type=valueThe type property can have one of the following values:
Browser Support
The type property is supported in all major browsers.
Example
Example
Return the type of a button:
<html><head>
<script type="text/javascript">
function alertType()
{
alert(document.getElementById("myButton").type)
}
</script>
</head>
<body>
<button id="myButton" type="button" onclick="alertType()">Click Me!</button>
</body>
</html>
Try it yourself »
- HTML DOM Button Object
- HTML DOM Document Object
- HTML DOM Event Object
- HTML DOM HTMLElement Object
- HTML DOM(Document Object Model)学习初步
- HTML DOM(document object model文档对象模型)
- html button
- DOM、HTML DOM、XML DOM
- 走进DOM:HTML DOM
- HTML DOM
- HTML DOM
- HTML DOM
- DOM HTML
- HTML DOM
- html DOM
- HTML DOM
- HTML DOM
- DOM HTML
- java面试题之编程【火星车问题】
- 两个简单例子揭示makefile中“=”和“:=”的区别
- 最近开发中遇到的一些怪事情
- 时间轴上 移出帧监听
- C语言的那些小秘密之指针(四)
- HTML DOM Button Object
- Vector使用
- C语言中可变形参简单实例和简单的printf功能的实例
- “设计模式”学习之一:工厂方法与抽象工厂
- 你的知识存储在大脑里还是存储在 Google 上?
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/s
- 玩转Android---组件篇---Service(服务)
- 程序开发基础学习二(C++ Google Style 命名规则)
- HTML Form Object