html - Javascript if form.pass location= open a webpage? -


i have following script opens file want open webpage www.google.com or www.yahoo.com

function pasuser(form) {     if (form.id.value=="user") {          if (form.pass.value=="password") {                           location = "file:///c:/users/......music.html"          } else {             alert("invalid password")         }     } else {           alert("invalid userid")     } } 

use location.href

location.href = "www.google.com"; 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -