Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
解码HTTP重定向内的URL_Http_Url_Redirect_Decode_Encode - Fatal编程技术网

解码HTTP重定向内的URL

解码HTTP重定向内的URL,http,url,redirect,decode,encode,Http,Url,Redirect,Decode,Encode,这是我的密码: <script> jQuery(window).attr("location", "https://myurl.com?firstname=Bretest&lastname=Martest&email=test1%40test.com&phone=(987) 654-3210"); </script> jQuery(window).attr(“位置”https://myurl.com?firstname=Bretest&la

这是我的密码:

<script>
  jQuery(window).attr("location", "https://myurl.com?firstname=Bretest&lastname=Martest&email=test1%40test.com&phone=(987) 654-3210");
</script>

jQuery(window).attr(“位置”https://myurl.com?firstname=Bretest&lastname=Martest&email=test1%40test.com&phone=(987) 654-3210");
问题是,我重定向到的url已编码:

我怎样才能让“&”解码?

您可以简单地使用:

window.location.href = "your address";