JavaScript decodeURI() Function

JavaScript decodeURI() Function

The decodeURI() function is used to decode a URI.

Syntax

decodeURI(uri)
Parameter Description
uri Required. The URI to be decoded

Example

<body>
<script language="JavaScript">

var uri="my test.php?name=ståle&amp;car=saab";
document.write(encodeURI(uri)+ "");
document.write(decodeURI(uri));
</script>
</body>

OUTPUT:

my%20test.php?name=st%C3%A5le&car=saab
my test.php?name=ståle&car=saab

DOWNLOAD SOLUTION HERE