例子:从A页面将‘myId’传到B页面
1、A页面传值
var url = encodeURI("html/editPostcard.html?myId="+ myId); window.location.href = url;
2、B页面接收值
var Ohref=decodeURI(window.location.href);
3、将获取到的链接(字符串)分割,拿到‘myId’
var myId=Ohref.split('?myId=');
例子:从A页面将‘myId’传到B页面
1、A页面传值
var url = encodeURI("html/editPostcard.html?myId="+ myId); window.location.href = url;
2、B页面接收值
var Ohref=decodeURI(window.location.href);
3、将获取到的链接(字符串)分割,拿到‘myId’
var myId=Ohref.split('?myId=');