I am using a url to open a html page, and i am sending data in querystring withe the page url.
For example: abc.html?firstParameter=firstvalue&seconedParam
abc.html?firstParameter=firstvalue&seconedParam
You have 3 options:
escape() will not encode: @*/+ encodeURI() will not encode: ~!@#$&*()=:/,;?+' encodeURIComponent() will not encode: ~!*()'
But in your case, if you want to pass a url into a GET parameter of other page, you should use escape or encodeURIComponent, but not encodeURI.