url - JavaScript: Replace hexadecimal character -
I have a string like "% 2Fu% 2F2069290% 2F"
in JavaScript (extracted from Gone) a web page). How do I get a human-readable version of that string?
short version : decodericompany ()
Use the.
Tall version : You can use unescape ()
in the old versions of JavaScript, but it has been removed because it only has LATIN1 / Works fine for ISO8859-1 codeet, so you actually want to use decodeurIComponent ()
, which is supported by all modern browsers.
var c = decodeurIComponent ("% 2Fu% 2F2069290% 2F"));
Comments
Post a Comment