EncodeURl() is used to convert URL into their hex coding. And DecodeURI() is used to convert the encoded URL back to normal.
1
2
3
4
5
6
7
8
9
|
<script>
varuri="my test.asp?name=ståle&car=saab";
document.write(encodeURI(uri)+"<br>");
document.write(decodeURI(uri));
</script>
|