How to use decodeURIComponent in JavaScript
This article describe about decodeURIComponent() Function in JavaScript.
decodeURIComponent() Function in JavaScript
This function is used to decodes a URI component.
Note: To encode the URI component use encodeURIComponent.
Syntax
Parameter |
Description |
uri |
Required. uri to decode. |
Example
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
var uri = "https://dotnetheaven.com/default.aspx?name=ståle&car=raman";
var uri_encode = encodeURIComponent(uri);
document.write(uri_encode);
document.write("<br />");
document.write(decodeURIComponent(uri_encode));
</script>
</body>
</html>
|
Output

You may also want to read these related articles Click here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here