Given an HTML document and the task to fire an event when a file is selected using jQuery. The JQuery change() method is used to fire an event when file is selected.
Using change() method: It is used to change the value of the input fields. This method works with “input, textarea and select” elements.
Example 1: The change() method is used to fire an event when file is selected.
Example 2: The change() method is used to fire an event when file is selected.
- jQuery | select() with Examples
- How to select an element by name with jQuery?
- How to select elements by attribute in jQuery ?
- How to add options to a select element using jQuery?
- How to select all elements without a given class using jQuery ?
- How to select ID that starts with certain character using jQuery ?
- How to select all on focus in input using JQuery?
- How to select text nodes using jQuery ?
- How to remove options from select element using jQuery ?
- How to select first element in the drop-down list using jQuery ?
- jQuery UI | Spinner to select numeric data
- jQuery | event.which property with Examples
- jQuery | Selectors and Event Methods
- jQuery | event.namespace Property
- jQuery | event.data Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.