HTML DOM Reset type property
Definition and Usage
type property returns the reset button form element type.
For the confirmation button, this attribute is always "reset".
grammar
resetObject.type
Browser Support
All major browsers support attribute type
Examples
Examples
The following example returns the reset button form element type:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ 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>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ 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>
try it"
Reset objects