HTML DOM Submit form properties
Definition and Usage
form property returns the confirmation button on the form that contains references.
If successful, the property returns a form object.
grammar
submitObject.form
Browser Support
All major browsers support form properties
Examples
Examples
The following example will return the form to the confirmation button belongs id:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function displayResult () {
var x = document.getElementById ( "submit1") form.id.;
alert (x);
}
</ Script>
</ Head>
<Body>
<Form id = "form1">
Email: <input type = "text" id = "email">
<Input type = "submit" id = "submit1">
</ Form>
<Button type = "button" onclick = "displayResult ()"> Display relevant form ID </ button>
</ Body>
</ Html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function displayResult () {
var x = document.getElementById ( "submit1") form.id.;
alert (x);
}
</ Script>
</ Head>
<Body>
<Form id = "form1">
Email: <input type = "text" id = "email">
<Input type = "submit" id = "submit1">
</ Form>
<Button type = "button" onclick = "displayResult ()"> Display relevant form ID </ button>
</ Body>
</ Html>
try it"
Submit objects