Input URL typeProperty
Examples
Return the form element type of the URL field:
var x = document.getElementById("myURL").type;
xThe output result is:url
Try it Yourself »
Definition and Usage
The type property returns the form element type of the URL field.
For input type="url", this property usually returns "url".
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the type property
Note:Internet Explorer or Safari browsers do not support HTML <input> elements using the type="url" attribute.
Syntax
urlObject.type
Technical Details
| Return value: | A string, representing the form element type of the URL field |
|---|
Input URL Object Other Extensions