【问题标题】:Decode URL Inside HTTP Redirect在 HTTP 重定向中解码 URL
【发布时间】:2013-06-03 22:51:33
【问题描述】:

这是我的代码:

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

问题是,我被重定向到的 url 被编码:

https://myurl.com?firstname=Bretest&amp%3Blastname=Martest&amp%3Bemail=test1%40test.com&amp%3Bphone=%28987%29+654-3210

如何让“&”通过解码?

【问题讨论】:

    标签: http url redirect decode encode


    【解决方案1】:

    你可以简单地使用:

    window.location.href = "your address";
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-06-01
      • 1970-01-01
      • 2013-08-03
      • 2020-09-05
      • 2015-11-02
      • 2015-03-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多