天天看点

HTML链接上把当前的URL做为参数传递时,注意要对URL进行encode,在JS中我们这样实现

<a href="javascript:void(0)"

onclick="javascript:location.href='http://url/register/login

?reffer='+encodeURIComponent(location.href)">

</a>

继续阅读