get jquery `$(this)` id

后端 未结 2 1561
不思量自难忘°
不思量自难忘° 2020-12-29 20:46

How can I get the id of the element that triggered the jQuery .change() function? The function itself works properly, but I need a specific action

2条回答
  •  渐次进展
    2020-12-29 21:11

    Do you mean that for a select element with an id of "next" you need to perform some specific script?

    $("#next").change(function(){
        //enter code here
    });
    

提交回复
热议问题