Easy Tutorial
❮ Prop Style Fontweight Prop Style Animationfillmode ❯

Reset type Attribute


Definition and Usage

The type attribute returns the form element type of the reset button.

For a reset button, this attribute is always "reset".

Syntax


Browser Support

All major browsers support the type attribute.


Example

The following example returns the form element type of the reset button:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>tutorialpro.org(tutorialpro.org)</title>
<script>
function displayResult(){
    var x=document.getElementById("reset1").type;
    alert(x);
}
</script>
</head>
<body>

<form>
Email: <input type="text" id="email">
<input type="reset" id="reset1">
</form>
<button type="button" onclick="displayResult()">Display input type</button>

</body>
</html>

❮ Prop Style Fontweight Prop Style Animationfillmode ❯