jquery ajax

来源:岁月联盟 编辑:exp 时间:2012-08-28
1:请求json
[html] 
$.getJSON("jcxxdr/countyBasicAction!getCsysdepartments", { 
                                departid : $(this).val() 
                            }, function(data) { 
                                $.each(data, function(k, v) { 
                 
                                    $("#county").append( 
                                            "<option value='"+v.districtcode+"'>" 
                                                    + v.departmentname + "</option>"); //为Select追加一个Option(下拉项) 
                                }); 
                 
                            });