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
☺ | Are you concerned that older browsers don't support JavaScript and thus exclude a set of Web users? individual users? |
☺ | What and where are the best JavaScript resources on the Web? |
☺ | What's Math Constants and Functions using JavaScript? |
☺ | How to make elements invisible? |
☺ | What Boolean operators does JavaScript support? |
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. |