天天看點

HTML連結上把目前的URL做為參數傳遞時,注意要對URL進行encode,在JS中我們這樣實作

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

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

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

</a>

繼續閱讀