Javatpoint Logo
Javatpoint Logo

jQuery select()

jQuery select event occurs when a text is marked or selected in text area or a text field. This event is limited to <input type="text"> fields and <textarea> boxes. When the select event occurs, the select() method attaches a function to run.

Syntax:

It triggers the select event for selected elements.

It adds a function to the select event.

Parameters of jQuery select() event

Parameter Description
Function It is an optional parameter. It is used to specify the function to run when the select event is executed.

Example of jQuery select() event

Let's take an example to demonstrate jQuery select() event.

Test it Now

Output:

Select the text on the box: click and drag the mouse to select text.

Next TopicjQuery change()




Let's Work Together!

Javatpoint is passionate to offer better content to the world. Please mail your contribution to contribute@javatpoint.com. We will show your name and create your user profile. You can contribute the following things:
  • Article on Any Topic (which is not available on Javatpoint)
  • Your Interview Experience on Company
  • Company Interview Questions with Answers
  • Recruitment Process of Company
  • Programs, and Algorithm
  • Videos
  • Test Paper
  • Improve Article

Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials