Total Page Preview: 000000000738
What is on change function in jQuery
On change function
The "on"method in jQuery is used to attach event handlers to selected elements. When used with the "change" event, the on method sets up a function to be called when the selected element's value changes.
The "change" event is triggered when an element's value has been changed, such as when the user selects a different option in a dropdown list, changes the content of an input field, or selects a different radio button.
Here's an example of how you can use the on method with the "change" event in jQuery:
In this example, when the value of the <select> element changes (i.e., when the user selects a different option), the on method triggers the defined function, which displays an alert with the selected value.
The on method is a powerful tool in jQuery for handling various types of events, including click, hover, submit, and more. By using it with the "change" event, you can create dynamic and interactive web pages that respond to user actions in real-time.
Thank You
About Author
Brijesh Kumar
Database Developer
I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL
Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall
and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com