var url=document.location.href; var url1=url.split("=")[1]; var url2="http://www.google.com/"+url1; console.log(url2);