YouTip LogoYouTip

Prop Reset Type

HTML DOM Reset type Property

HTML DOM Reset type Property

-- Learning is not just about technology, but also about dreams!

JavaScript Reference

Overview

JavaScript Objects

Browser Objects

DOM Objects

HTML Objects

HTML DOM Radio Object

<input> - search

Reset type Property

Reset Object Reference Reset Object


Definition and Usage

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

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

Syntax

resetObject.type

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

The type property is supported in all major browsers.


Example

Example

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

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>Tutorial(example.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 yourself Β»


Reset Object Reference Reset Object

← Prop Link HreflangProp Reset Name β†’