WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Input URL Object


Input URL Object

The Information URL Object is new in HTML5.

The Input URL object speaks to a HTML <input> component with type="url".

Note: <input> components with type="url" are definitely not upheld in Internet Explorer 9 (and prior variants), or Safari.

Access an Input URL Object

You can get to a <input> component with type="url" by utilizing getElementById():

var x = document.getElementById("myUrl");

Tip: You can likewise get to <input type="url"> via looking through the elements gathering of a form.

Create an Input URL Object

You can make a <input> component with type="url" by utilizing the document.createElement() method:

var x = document.createElement("INPUT");
x.setAttribute("type", "url");

Input URL Object Properties

Property Description
autocomplete Sets or returns the estimation of the autocomplete trait of a URL field
autofocus Sets or returns whether a URL field ought to consequently get center at the point when the page loads
defaultValue Sets or returns the default estimation of a URL field
disabled Sets or returns whether a URL field is debilitated, or not
form Returns a reference to the structure that contains the URL field
list Returns a reference to the datalist that contains the URL field
maxLength Sets or returns the estimation of the maxlength quality of a URL field
name Sets or returns the estimation of the name quality of a URL field
pattern Sets or returns the estimation of the example quality of a URL field
placeholder Sets or returns the estimation of the placeholder quality of a URL field
readOnly Sets or returns whether the URL field is perused just, or not
required Sets or returns whether the URL field must be rounded out before presenting a form
size Sets or returns the estimation of the size property of the URL field
type Returns which sort of structure component the URL field is
value Sets or returns the estimation of the esteem characteristic of a URL field