数据导入

代码:

var chapterImages = [];
var chapterPath = "";

var imgSrc = [];
$("#mainView_img img").each(function () {
  imgSrc.push($(this).attr("src"));
});
console.log(imgSrc);
sessionStorage.setItem("imgSrc", JSON.stringify(imgSrc));

.

原文地址:https://www.cnblogs.com/crazycode2/p/14589243.html