javascript - change URL url friendly -


this question has answer here:

hi have url (top) i'm trying use "pinterest" change url (bottom). know how can change (top) url same "pinterest" url. there jquery plugin? or somthing (decodeuricomponent)??? maybe there nothing other using .replace. thought ask first. thanks

 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 

you can use encodeuricomponent & decodeuricomponent function of javascript.

 encodeuricomponent(uour_url)   decodeuricomponent(encoded_uri) 

check http://jsfiddle.net/agqfk/1/


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -