Javascript examples for String Operation:String URL
Put a URL in a HTTP request as the query string
<html lang="en"> <head> <script> function redirect(){//from w w w . j a va 2s . com //url you want to encrypt url = "http://www.example.com"; //url encryption with BTOA function base64Url = btoa(url) // Lets Redirect to the new url with URL encrypted window.location = "http://www.new Address.com?url="+base64Url } </script> </head> <body> <a href="#" onclick="redirect()">redirect</a> </body> </html>