AJAX控制DropDownList两级联动

$(function () {

           $("#CompanyID").change(function () {

               var uid = $(this).val();
               changediv(uid);
           });
       });

       function changediv(uid) {

           var url = "@Url.Action("GetJsonDrop","TheOrder")";
            var param = new Object();
            param.id = uid;
            $.z_ajaxAction(url, param, function (result) {
                var obj = result;

                $('#LinkManID').html('');
                $.each(result, function (i, item) {
                    $('#LinkManID').append($("<option></option>").val(item.ID).html(item.LinkManName));
                });
            });
        }

 

posted @ 2015-09-16 17:39  九省巡按  阅读(154)  评论(0编辑  收藏  举报