Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Input URL form Property

Input URL form property

Input URL Object Reference The Input URL object

Example

Return the form containing The form id to which the element belongs:

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

x

The output is:

myForm

Try it »


Definition and Usage

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

On success, this attribute returns the form object.

Note: This attribute is read-only.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the form attribute.

Note: Internet Explorer or Safari browsers do not support HTML that uses the type="url" attribute. .


Syntax

urlObject

.form

Technical Details

Return Value: A reference to the form element containing the URL field. If the URL field is not inside a form, it returns null.

Input URL Object Reference The Input URL object