Jquery change event

The change event occurs when the value of an element has been changed (only works on <input>, <textarea> and <select> elements).

The change() method triggers the change event, or attaches a function to run when a change event occurs.

Code

<script>
$(document).ready(function(){
    $("select").change(function(){
        alert("changed.");
    });
});
</script>

Leave a Reply

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