标签:cti this on() sele pid name string fun json
var platformListJson = ‘${platformListJson}‘;
var shopPlatformHtml=‘‘;
$(JSON.parse(platformListJson)).each(function (i, o) {
shopPlatformHtml+=‘<option value="‘+o.code+‘" shopList=‘+JSON.stringify(o.shopList)+‘>‘+o.name+‘</option>‘;
});
$(‘#shopPlatform‘).html(shopPlatformHtml).change(function(){
var shopList=JSON.parse($(this).find(‘option:selected‘).attr(‘shopList‘));
var shopCodeHtml=‘‘;
$(shopList).each(function(i,o){
shopCodeHtml+=‘<option value="‘+o.shopId+‘">‘+o.shopName+‘</option>‘;
});
$(‘#shopCode‘).html(shopCodeHtml);
}).change();
标签:cti this on() sele pid name string fun json
原文地址:https://www.cnblogs.com/chenxiaoxian/p/9796520.html