一个html页面传入参数到另一个html页面用js获取方法

没错使用以下函数就能够完整的获取到路径里的你想要的参数:
function getURLParameter(name) { return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null; }

posted @ 2017-04-08 11:01  鄒成立  阅读(4746)  评论(0)    收藏  举报