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

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

clojure - 'get' replacement that throws exception on not found? -