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.
我已经用 jquery 构建了一个选择字段样式插件,这很好用,但是一些用户正在使用 js/jquery 向选择字段添加新选项,所以我需要一种插件自动更新它的方法。我不想重新调用插件,有没有办法做到这一点?
$(selector).change(function(){ // do something when select is changed alert( $(this).val() ); });