Input URL type attribute

Definition and Usage

type The attribute returns the type of form element for the URL field.

For input type="url", this attribute will always return "url".

Example

Returns which type of form element the URL field is:

var x = document.getElementById("myURL").type;

Try It Yourself

Syntax

urlObject.type

Technical Details

Return Value: String value, representing the form element type of the URL field.

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Supported 10.0 Supported Not Supported Supported