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‘;
}
时间: 2024-11-03 20:57:13