-
search and replace in javascript
Could someone please tell me how to search and replace in javascript. I want to search for:
a "+" in a varaible and replace it with %2B
and search for a "&" and replace it with %26
I'd be very grateful if someone could help me out
thanks
-
If you need to escape characters in JavaScript simply use the escape function:
str=escape(str); it will apply URL encoding rules which seems what you want.
-
Thanks a lot for your help Alex 
I'll try them now
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks