更改URL网址友好

时间:2013-08-13 02:52:47

标签: javascript

嗨我有这个URL(顶部)我试图用“pinterest”他们改变url(底部)。有谁知道如何改变我的(顶部)网址与“pinterest”网址相同。有Jquery插件吗?或类似的东西(decodeURIComponent)???也许只有使用.replace。我以为我会先问。感谢

 http://my.site.com/folder/shadez/zoom.php?returntype=2&size=small&images[]=Base.jpg&images[]=Frame_Clear.png&images[]=Left_Clear.png&images[]=Right_Clear.png&images[]=Lenses_Lenses-Semi-Clear.png

 http%3A%2F%2Fmy.site.com%2Ffolder%2Fshadez%2Fzoom.php%3Freturntype%3D2%26size%3Dsmall%26images%5B%5D%3DBase.jpg%26images%5B%5D%3DFrame_Clear.png%26images%5B%5D%3DLeft_Clear.png%26images%5B%5D%3DRight_Clear.png%26images%5B%5D%3DLenses_Lenses-Semi-Clear.png

1 个答案:

答案 0 :(得分:0)

您可以使用encodeURIComponent& decode_COMCOM的组件函数。

 encodeURIComponent(uour_url)

 decodeURIComponent(encoded_uri)

选中此http://jsfiddle.net/aGQFK/1/