Solved

JavaScript: Escape / Unescape Using _ instead of %

Posted on 2013-11-05
1
223 Views
Last Modified: 2013-11-06
Using JavaScript, how can I use _ instead of % to escape characters?

var xyz = escape('Hello_World "123%"');
document.write( xyz );
document.write( '<hr/>');
document.write( unescape(xyz) );

Open in new window

0
Comment
Question by:hankknight
1 Comment
 
LVL 32

Accepted Solution

by:
Big Monty earned 500 total points
Comment Utility
you would have to do it manually:

var xyz = Hello_World "123%';
xyz = xyz.replace( '%', '_' )
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now