HTML5 下拉控件绑定数据

2022-11-24,,,,

<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 下拉控件绑定数据的相关教程结束。

《HTML5 下拉控件绑定数据.doc》

下载本文的Word格式文档,以方便收藏与打印。