Array.prototype.contains = function (element) {
for (var i = 0; i < this.length; i++) {
if (this[i] == element) {
return true;
}
}
return false;
};
$(function(){
var arrays = cb.split(",");
$("input[type='checkbox']").each(function() {
if (arrays.contains($(this).val())) {
$(this).attr("checked", "checked");
}
});
});
for (var i = 0; i < this.length; i++) {
if (this[i] == element) {
return true;
}
}
return false;
};
$(function(){
var arrays = cb.split(",");
$("input[type='checkbox']").each(function() {
if (arrays.contains($(this).val())) {
$(this).attr("checked", "checked");
}
});
});
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货