a href=b.html?id=楼主>B页面</a>b.html中的获取函数:function getParam(){C1=window.location.href.split("?")[1]; //得到id=楼主C2=C1.split("=")[1]; //得到楼主alert(C1); alert(C2)}
已亲测,可行!
JS标签获取另一个页面传过来的href值
原文:https://www.cnblogs.com/share-record/p/10518621.html