The Submit type property
The Submit objectDefinitions and usages
The type property returns the type of form element for the confirmation button.
For the confirmation button, the property is always "submit".
Grammar
Browser support
The type property is supported by all major browsers
The following example returns the type of form element for the confirmation button:
<html>
<head>
<meta charset="utf-8">
Online tutorials for W3Cschool (w3cschool.cn)
<script>
function displayResult(){
var x=document.getElementById("submit1").type;
alert(x);
}
</script>
</head>
<body>
<form>
Email: <input type="text" id="email">
<input type="submit" id="submit1">
</form>
"button" onclick" "displayResult()"
</body>
</html>
Try it out . . .
The Submit object