首页 > Web开发 > 详细

HTML5 下拉控件绑定数据

时间:2018-03-12 13:18:26      阅读:240      评论:0      收藏:0      [点我收藏+]
<select id="CommunityList" class="form-control" >
          <option>請選擇社團</option>                                              
</select></td>
 $.ajax({
                url: ‘/Account/Personal_GetCommunityListByUserNeima‘,
                type: "GET",
                dataType: "JSON",
                data: { CountryCode: countryCode, Mobile: mobile },
                success: function (CommunityList) {
                
                    $("#CommunityList").html("");
                    $.each(CommunityList, function (i, Community) {
                        $("#CommunityList").append(
                            $(‘<option></option>‘).val(Community.CommunityID).html(Community.CommunityName));                       
                        if (i >= 1)
                        {
                            $("#Community").show();
                            $("#CommunityList").show("");
                        }
                    });
                }
            });

 

HTML5 下拉控件绑定数据

原文:https://www.cnblogs.com/chuangjie1988/p/8548494.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!