encodeURL编码 decodeURL解码
第一个页面
var searchUrl=encodeURI('index2.html?name=' + name + '&danwei=' + danwei)
window.location.href = searchUrl;
第二个页面
var url = decodeURI(window.location.href.split('?')[1]);
encodeURL编码 decodeURL解码
第一个页面
var searchUrl=encodeURI('index2.html?name=' + name + '&danwei=' + danwei)
window.location.href = searchUrl;
第二个页面
var url = decodeURI(window.location.href.split('?')[1]);