Input URL type property
Example
Return the form element type of the URL field:
var x = document.getElementById("myURL").type;
x
The output is:
url
Try it »
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 that uses the type="url" attribute. .
Syntax
urlObject
.type
Technical Details
| Return Value: | A string representing the form element type of the URL field |
|---|
The Input URL object