How to fill a DropDown using Jquery Ajax Call?

前端 未结 4 733
南方客
南方客 2020-12-09 22:20

I have a WebMethod which gets data that I want to fill DropDown with in a DataSet. Currently I am filling the dropdown using a hardcoded object. But I want to replace this

4条回答
  •  死守一世寂寞
    2020-12-09 22:45

    function GetDropDownData() {
        $.ajax({
            type: "POST",
            url: "test.aspx/GetDropDownDataWM",
            data: '{name: "abc" }',
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function(data.d)
                    {
                        $.each(data.d, function (){
                            $(".myDropDownLisTId").append($("

提交回复
热议问题