标签:
var old_destid = localStorage.getItem(‘destid‘);
if (!old_destid) {
var destids = [];
destids.push(destid)
} else {
var destids = old_destid.split(‘,‘);
if ($.inArray(‘<?= $destid ?>‘, destids) == ‘-1‘) {
destids.push(destid)
}
}
localStorage.setItem(‘destid‘, destids.join(‘,‘));//保存数据
var old_destid = localStorage.getItem(‘destid‘);
if (old_destid) {
var destids = old_destid.split(‘,‘);
var dest_stu = $.inArray(‘‘ + dest.destid + ‘‘, destids) >= 0 ? ‘yicanguan‘ : ‘weicanguan‘;
}
标签:
原文地址:http://www.cnblogs.com/YTzZ/p/4538659.html