像这样更改代码:
jQuery('#dropdown_id').live('change', function(event) { jQuery.getJSON($(this).val(), function(snippets) { for(var id in snippets) { // updated to deal with any type of HTML jQuery('#' + id).html(snippets[id]); } });});您的下拉菜单应如下所示:
<select id="dropdown_id"> <option value="one.php">One</option> <option value="two.php">Two</option></select>



