操作两次之后 打印出来的两组数据都一样,是为什么求解答相关代码// var cuts = new Array();var cut = {};
$('.cut').on('touchstart',function(e){
video.play(); var cutStartTime = video.currentTime;
cut['cutStartTime'] = cutStartTime;
})
$('.cut').on('touchend',function(e){
video.pause(); var cutEndTime = video.currentTime;
cut['cutEndTime'] = cutEndTime;
cuts.push(cut); var jsoncut = JSON.stringify(cuts);
writeCookie ('cuts', jsoncut);
})打印出来的[{"cutStartTime":1.28,"cutEndTime":2.294303},{"cutStartTime":1.28,"cutEndTime":2.294303}]
添加回答
举报
0/150
提交
取消