The type
property gets type string of a reset button.
type |
Yes | Yes | Yes | Yes | Yes |
var v = resetObject.type
Type | Description |
---|---|
String | The type string of the reset button is |
The following code shows how to get the type string of the Reset button.
<!DOCTYPE html>
<html>
<body>
<!--from ww w . ja v a2 s . c o m-->
<input type="reset" id="myReset">
<button onclick="myFunction()">test</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myReset").type;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>
The code above is rendered as follows: