- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
decodeURIComponent() function in JavaScript
The decodeURIComponent() function accepts a string value representing an encoded URI (Uniform Resource Identifier) decodes it and returns the result.
Syntax
Its Syntax is as follows
encodeURIComponent('http://www.qries.com/');
Example
<html> <head> <title>JavaScript Example</title> </head> <body> <script type="text/javascript"> var encodedData = encodeURIComponent('http://www.qries.com/?x=шеллы'); document.write("Encoded Data: "+encodedData); document.write("<br>"); var decodedData = decodeURIComponent(encodedData); document.write("Decoded Data: "+decodedData); </script> </body> </html>
Output
Encoded Data: http%3A%2F%2Fwww.qries.com%2F%3Fx%3D%D1%88%D0%B5%D0%BB%D0%BB%D1%8B Decoded Data: http://www.qries.com/?x=шеллы
Advertisements
To Continue Learning Please Login
Login with Google