check which drop down was changed
i have a form where i want to know which drop down list was modified. how can i accompli开发者_运维知识库sh this using jquery? i know for textbox controls you can do some thing like
$("input[type='text']").change(function() {
// do something here
});
but i need to do something similar for drop down list controls.
$("select").change(function() {
// do something here
});
$(document).ready(function(){
$('select').change(function(e){
console.log($(e.currentTarget));
});
});
The currentTarget
attribute of the event object will give you access to the specific element that triggered the event.
精彩评论