当前位置:编程学习 > JAVA >>

jquery ajax

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(下拉项) 
                                }); 
                 
                            }); 
补充:web前端 , JavaScript ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,