Answers for "how to encode url in jsp"

0

Encode URL in JavaScript?

Check out the built-in function encodeURIComponent(str) and encodeURI(str).
In your case, this should work:

var myOtherUrl = 
       "http://example.com/index.html?url=" + encodeURIComponent(myUrl);
Posted by: Guest on March-15-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language