Input Email formProperty

Input Email 对象参考手册Input Email Object

Example

Return the id of the form to which the <input type="email"> element belongs:

var x = document.getElementById("myEmail").form.id;
xThe output result is:
myForm

Try it Yourself »

Definition and Usage

The form property returns a reference to the form containing the email field.

On success, this property returns the form object.

Note:This property is read-only.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the form property.

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


Syntax

emailObject.form

Technical Details

Return Value: A reference to the form element that contains the email field. If the email field is not in a form, returns null.


Input Email 对象参考手册Input Email Object Other Extensions