HTML DOM Submit type property
Definition and Usage
type property returns the confirmation form element type buttons.
For the confirmation button, this attribute is always "submit".
grammar
submitObject.type
Browser Support
All major browsers support attribute type
Examples
Examples
The following example returns the confirmation 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 ( "submit1") type.;
alert (x);
}
</ Script>
</ Head>
<Body>
<Form>
Email: <input type = "text" id = "email">
<Input type = "submit" id = "submit1">
</ 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 ( "submit1") type.;
alert (x);
}
</ Script>
</ Head>
<Body>
<Form>
Email: <input type = "text" id = "email">
<Input type = "submit" id = "submit1">
</ Form>
<Button type = "button" onclick = "displayResult ()"> Display input type </ button>
</ Body>
</ Html>
try it"
Submit objects