1、localStorage 2、这个写个通用文件common.js function getstr(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if(r != null) return decodeURIComponent(r[2]); return null; }
a.html window.location = 'detail_past.html?id=11&cid=传值';
b.html alert(getstr("id")+getstr("cid"));