本文介绍了jquery数据不绑定到下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我无法通过jquery json绑定绑定下拉列表。但在检查浏览器时,我可以看到数据。但不限于下拉列表。请帮帮我。 -------------- -------------------------------------------------- --------- 检查代码:I am not able to bind the dropdownlist by jquery json binding. But while inspecting browser i can see the data. But not binding to dropdown. Please help me.-------------------------------------------------------------------------inspect code :d: [,…]0: {__type: "dropdown.WebService1+CountryDetails", CountryId: "211249", CountryName: " New Bolt & Tools"}CountryId: "211249"CountryName: " New Bolt & Tools"__type: "dropdown.WebService1+CountryDetails" ------------------- -------------------------------------------------- ---------- i需要国家名称绑定 ------------------------- -----------------------------------------------------------------------------------------i need the countryname to bind-----------------------------------<script type="text/javascript"> $(document).ready(function () { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebService1.asmx/BindDatatoDropdown", data: JSON.stringify({ bCode: '<%=branchCode %>', stcon: '<%=strCon %>' }), dataType: "json", success: function (data) { $.each(data.d, function (key, value) { $("#ddlCountryx").append($("<option></option>").val(value.CountryId).html(value.CountryName)); }); }, error: function (result) { alert("Error"); } }); });</script> ----------------- -------------------------------------推荐答案 这篇关于jquery数据不绑定到下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-20 21:18