a标签跳转到B页面
B页面
<script type="text/javascript">
var sHref = window.location.href;
var args = sHref.split("?");
var retval = "";
var str = args[1];
args = str.split("&");
for (var i = 0; i < args.length; i++) {
str = args[i];
var arg = str.split("=");
if (arg.length <= 1) continue;
if (arg[0] == "id") retval = arg[1];
}
alert(retval);
</script>