` element: ``` var x = document.getElementById("myEmail").form.id; ``` ``` myForm ``` ---"> ` element: ``` var x = document.getElementById("myEmail").form.id; ``` ``` myForm ``` ---" />
Easy Tutorial
❮ Event Onhashchange Jsref Indexof ❯

Input Email form Attribute

Input Email Object

Example

Returns the form ID of the <input type="email"> element:

var x = document.getElementById("myEmail").form.id;
myForm

Definition and Usage

The form attribute returns a reference to the form that contains the email field.

This attribute returns a form object upon success.

Note: This attribute is read-only.


Browser Support

All major browsers support the form attribute.

Note: Internet Explorer 9 (and earlier versions) and Safari do not support the HTML <input> element with type="email".


Syntax

Technical Details

| Return Value: | A reference to the form element that contains the email field. Returns null if the email field is not in a form. | | --- | --- |

❮ Event Onhashchange Jsref Indexof ❯