Javascript examples for Browser Object Model:Window open
Open in new window
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> function goToPage() {// w ww.jav a2 s . co m var url = document.querySelector("[type=\"text\"]").value window.open(url, "_blank", ) } </script> </head> <body> <form> <input type="text" id="USPS_Tracking_Number"> <input type="button" value="Check Number" onclick="goToPage();"> <input type="reset" value="Reset"> </form> </body> </html>