首页 > 安全资讯 >

jquery ajax

12-08-28

1:请求json[html]$.getJSON("jcxxdr/countyBasicAction!getCsysdepartments", { departid : $(this).val() }, function(data) { $.each(data, function(k, v) { $("#county").append( "<option va...

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(下拉项) 
                                }); 
                 
                            }); 
相关文章
最新文章
热点推荐