标签:jquer jquery span size ons selected 动态 blog log
// jquery实现动态选中select
var active = $(‘.all_sla_title1 .active‘)
var group_name = active.html();
var sla = active.attr(‘data-sla‘);
var remote = active.attr(‘data-remote‘);
// console.log(group_name + sla + remote);
$.each($(‘#sla option‘), function(i, n) {
if ($(n).val() == sla) {
$(n).attr("selected", true);
}
});
标签:jquer jquery span size ons selected 动态 blog log
原文地址:http://www.cnblogs.com/gentsir/p/6653092.html