Open In App

HTML DOM Input URL select() Method

Last Updated : 26 Aug, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

The HTML <input type=”url”> is used to define a field that entered a URL. This input value is automatically validated before submitting the form.

The input URL select() method in HTML DOM is used to select the content of a URL text field. It is an in-built method of input URL Object. Refer to components of a URL from the given link

Approach: Blue background color is added to the content of the URL when the user clicks on the button to show that it's selected.

Syntax:

URLObject.select()
  • Parameters: It does not accept any parameter.
  • Return Value: It does not return any value.

Example: This example uses the input URL select() method to select the content inside the URL Field. 

Output:

HTML DOM Input URL select() Method
HTML DOM Input URL select() Method

Supported Browsers: The list of browsers supported by HTML DOM Input URL select() Method are listed below:- 

  • Google Chrome 1
  • Edge 12
  • Firefox
  • Safari
  • Opera 11

Next Article
Article Tags :

Similar Reads