Prev Demo
JavaScript
>
Decoding URI Component
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <p>Click the below button to Encode URI component.</p> <input type="button" onclick="myDecoding()" value="Encode&Decode"> <p id="myId"></p> <script> function myDecoding() { var U = "http://www.dotnetfunda.com/advices/show/1125/9-years-stagnant-career-and-looking-of-job-in-dot-net-platform?_#$%^&*()"; var E = encodeURIComponent(U); //* Encode the String *// var D = decodeURIComponent(E); //* Decode the Encoded String *// var R = "Encoded URI component Result is:" + E + "</br></br>" + "Decoded URI component Result is:" + D; document.getElementById("myId").innerHTML = R; } </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output