HTML DOM id Property
Complete Button Object Reference
Definition and Usage
The id property sets or returns the id of a button.
Syntax
Example
The following example gets the id of the button:
<html>
<head>
<script type="text/javascript">
function alertId()
{
alert(document.getElementById("myButton").id)
}
</script>
</head>
<body>
<form>
<button id="myButton" onClick="alertId()">
Click me!</button>
</form>
</body>
</html>
|
Try-It-Yourself Demos
Alert id,
and type of a Button object + 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. |
|
|
|