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.
尝试这个:
var $select = $('#select_id'); $select.load('code.php', function () { $select.change(function() { alert('Handler for .change() called.'); }); });
我们在这里使用了回调函数。因此,代码select.change()将在后处理和 HTML 插入完成后执行。
select.change()