HTML | DOM Input URL Object Last Updated : 25 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The Input URL object in HTML DOM represents an <input> element with type = "url" attribute. The element with type url can be accessed by using getElementById() method. Syntax: document.getElementById("id"); where id is assigned to the <input> tag. Property Values: list: It returns the reference of data list that contains the URL field.form: It returns the reference of form that contains the URL field.autocomplete: It is used to set or return the value of the autocomplete attribute of a URL field.autofocus: It is used to set or return if the URL field should automatically get focus when the page loads.defaultvalue: It is used set or return the default value of a URL field.disabled: It is used to set or return whether a URL field is disabled or not.maxLength: It is used to set or return the value of the maxlength attribute of a URL field.name: It is used to set or return the value of the name attribute of a URL field.pattern: It is used to set or return the value of the pattern attribute of a URL field.placeholder: It is used to set or return the value of the placeholder attribute of a URL field.readOnly: It is used to set or return whether the URL field is read-only or not.required: It is used to set or return whether the URL field must be filled out before submitting a form.size: It is used to set or return the value of size attribute of the URL field.type: It returns the type of form element the URL field belongs.value: It is used set or return the value of the value attribute of a URL field. Methods focus() : It is used to get focus to the input URL field.blur () : It is used to remove focus from the URL field.select () : It is used to select the content of the Input URL field. Example 1: HTML <!DOCTYPE html> <html> <head> <title> DOM Input URL Object </title> </head> <body> <center> <h1 style="color:green;"> GeeksForGeeks </h1> <h2>DOM Input URL Object</h2> <label for="uname" style="color:green"> <b>Enter URL</b> </label> <input type="url" id="gfg" placeholder="Enter URL"> <br><br> <button type="button" onclick="geeks()"> Click </button> <p id="GFG"></p> <script> function geeks() { var link = document.getElementById("gfg").value; document.getElementById("GFG").innerHTML = link; } </script> </center> </body> </html> Output: Before Click on the button: After Click on the button: Example 2: HTML <!DOCTYPE html> <html> <head> <title> DOM Input URL Object </title> </head> <body> <h1> GeeksForGeeks </h1> <h2>DOM Input URL Object </h2> <label> <b>Enter URL</b> </label> <button type="button" onclick="myGeeks()"> Click </button> <p id="GFG"></p> <script> function myGeeks() { var link = document.createElement("INPUT"); link.setAttribute("type", "url"); link.setAttribute("value", "https://www.geeksforgeeks.org"); document.body.appendChild(link); } </script> </body> </html> Output: Before Click on the button: After Click on the button: Supported Browsers: Google Chrome 1+Edge 12+FirefoxOpera 11+Safari Comment More infoAdvertise with us bestharadhakrishna Follow Improve Article Tags : Technical Scripter Web Technologies HTML HTML-DOM Similar Reads HTML | DOM Input Week Object The Input Week object in HTML DOM represents an <input> element with type = "week" attribute. The element can be accessed by using getElementById() method. Syntax: document.getElementById("id"); where id is assigned to the <input> tag. Property Values: list: It returns the reference of d 3 min read HTML | DOM Style borderImageSource Property The DOM Style borderImageSource Property is used to set or return the image to be used instead of the styles given by the border-style property. Syntax: To get the borderImageSource propertyobject.style.borderImageSourceTo set the borderImageSource propertyobject.style.borderImageSource = "none | im 3 min read HTML | DOM Progress max Property The DOM Progress max Property is used to set or return the value of the max attribute of an <progress> element. The max attribute represents the total work is to be done for completing a task. Syntax: It is used to return the progress max property. progressObject.maxIt is used to set the progr 2 min read HTML | DOM Textarea autofocus Property The DOM Textarea autofocus Property is used to set or return whether the element should get focus when the page loads. This property is used to reflect the HTML autofocus attribute. Syntax: It is used to Return the autofocus property. textareaObject.autofocusIt is used to Set the autofocus property. 2 min read HTML | DOM ClipboardEvent The ClipboardEvent refers to all the events which occur when the clipboard is modified. All the properties and methods are inherited from the âEvent Objectâ. There are 3 main ClipboardEvents:oncopyoncutonpasteReturn Value: It returns an object containing the data affected by the clipboard operation. 1 min read HTML | DOM Input Range Object The Input Range Object in HTML DOM is used to represent the HTML < input > element with type="range". This object is used to access or create the <input> element. This element can be accessed by using getElementById() method. Syntax: document.getElementById("Input_ID"); This Input_ID is 2 min read HTML | DOM Window closed Property The Window closed property in HTML DOM is used to return a value that indicates whether the referred window is closed or not. Syntax: window.close() Return Value: A Boolean value, true if window is closed otherwise false. Example: HTML <!DOCTYPE html> <html> <head> <title> HT 1 min read HTML | DOM Style textAlignLast Property The Style textAlignLast property in HTML DOM is used to set the alignment of the last line of the text. Syntax: Return the textAlignLast property: object.style.textAlignLast Set the textAlignLast property: object.style.textAlignLast = "auto | left | right | center | justify | start | end | initial | 2 min read HTML | DOM TouchEvent When a user touches a touch-based device the resulted events are handled by TouchEvent Object. The touch events consist of three types of interfaces i.e. Touch, TouchEvent and TouchList. The single contact point events on a touch-sensitive device are handled by the Touch interface. The events which 2 min read HTML | DOM Storage Event The Storage Event in HTML DOM is used to make change in the storage area in the context of another document. When there is modification in the storage area of the window, a storage event is sent to that window. Syntax: window.addEventListener("storage", script) Example: html <!DOCTYPE html> 1 min read Like