HTML DOM type Property
Complete Button Object Reference
Definition and Usage
The type property returns the type of form element. For a Button object this will
always be "button".
Syntax
Example
The following example returns which type of form element the button is:
<html>
<head>
<script type="text/javascript">
function alertType()
{
alert(document.getElementById("myButton").type)
}
</script>
</head>
<body>
<form>
<input type="button" value="Click me!" id="myButton"
onclick="alertType()" />
</form>
</body>
</html>
|
Try-It-Yourself Demos
Alert id, type, and value of a Button + disable button
Complete Button Object Reference
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|