Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
利用
$(document).on('change','select[id^=subject]',function(){
因为您要添加counter默认设置为一个,所以我认为它甚至不适用于第一个选择框。
counter
所以上面code的使用将适用于所有以 . 开头的selects人。idsubject
code
selects
id
subject