What are decodeURI() and encodeURI() functions in JavaScript?
Submitted by: AdministratorMany characters cannot be sent in a URL, but must be converted to their hex encoding. These functions are used to convert an entire URI (a superset of URL) to and from a format that can be sent via a URI.
<script type="text/javascript">
var uri = "http://www.google.com/search?q=Online Web Tutorials at GlobalGuideLine"
document.write("Original uri: "+uri);
document.write("<br />encoded: "+encodeURI(uri));
</script>
Submitted by: Administrator
<script type="text/javascript">
var uri = "http://www.google.com/search?q=Online Web Tutorials at GlobalGuideLine"
document.write("Original uri: "+uri);
document.write("<br />encoded: "+encodeURI(uri));
</script>
Submitted by: Administrator
yes
Submitted by: Alfrednjeru
Submitted by: Alfrednjeru
Read Online JavaScript Job Interview Questions And Answers
Top JavaScript Questions
☺ | What does isNaN function do? |
☺ | How to associate functions with objects using JavaScript? |
☺ | What looping structures are there in JavaScript? |
☺ | How to force a page to go to another page using JavaScript? |
☺ | How to create a confirmation box? |
Top Top World Wide Web Categories
☺ | Cascading Style Sheet CSS Interview Questions. |
☺ | HTML5 Interview Questions. |
☺ | Basic Internet Interview Questions. |
☺ | Domain Name System (DNS) Interview Questions. |
☺ | JavaScript Interview Questions. |