Input URL form attribute
Definition and Usage
form
The property returns a reference to the form containing the URL field.
This property returns the form object on success.
Note:This property is read-only.
Example
Return the id of the form containing the <input type="url"> element:
var x = document.getElementById("myURL").form.id;
Syntax
urlObject.form
Technical details
Return value: |
Reference to the form element containing the URL field. If the URL field is not in the form, then return |
---|
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Supported | 10.0 | Supported | Not supported | Supported |