Horje
Encode URL in JavaScript? Code Example
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);




Javascript

Related
cypress click link contains text Code Example cypress click link contains text Code Example
Axios FormData / not JSON Code Example Axios FormData / not JSON Code Example
bootstrap 4 navbar-collapse not working angular Code Example bootstrap 4 navbar-collapse not working angular Code Example
jquery ajax responseText Code Example jquery ajax responseText Code Example
how to access dictionary keys in js Code Example how to access dictionary keys in js Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7