HTML DOM Input URL form Property
Definition and Usage
The form property returns a reference to the form that contains the URL field.
On success, this property returns a form object.
Note: This property is read-only.
Browser Support
The form property is supported by all major browsers.
Note: Internet Explorer or Safari browsers do not support the HTML <input> element with the type="url" attribute.
Syntax
urlObject.form
Technical Details
| Return Value: | A reference to the form element that contains the URL field. Returns null if the URL field is not in a form. |
|---|
Example
Return the id of the form that contains the <input type="url"> element:
var x = document.getElementById("myURL").form.id;
x output will be:
myForm
YouTip