Javascript examples for Browser Object Model:Location
Set URL to window location
<html> <head></head> <body> <form> <input type="text" id="search"> </form> <input type="button" value="Login" onclick="myFunction()"> <script> function myFunction() { var search = document.getElementById("search").value; var url = "https://" + search + "/uc_admin"; window.location = url//from w w w . ja va2 s .c o m }; </script> </body> </html>