开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜