jQuery on(“input”) Event

The jQuery on input change event works when using on("input") method. You can use this method to get the value of input field when enter content on it.

Syntax

The syntax of the method is given below:-

Syntax to Return the Value Attribute
$(selector).on(‘input’, function(){
   $(this).val();
});

Description of the Parameters

The description of the parameters are given below.

Parameter Name Description
selector The selector is used to select the input elements to get value on enter content. Enter tag name, class name, or id of the elements to select.
this Select the current clicked element to get its value.

Examples of jQuery on(“input”) Method to Get Value on Input Change

Get Value on Enter Content

To get value on input change event in jQuery, you can check the example given below.

Example 1

You may also like to read

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.