encodeURIComponent
window.location.href=passport_url+"/user/login?backurl="+encodeURIComponent(ahost+"/index.php?m=callup&a=index&cid="+cid_crypt);
本文转载:CSDN博客