微信端web页面将传值

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"));

猜你喜欢

转载自my.oschina.net/u/3407699/blog/1807250