I have a button on a webpage that onclick i want the user to be verified -...

...javascript html help? Therefore i want a password prompt when the button is clicked. If the password if correct the page navigates to update.html if not nothing is done. This password is a set password not in any database or anything. How can i get this accomplished. i am trying this script function but it doesnt work...

function Click()
{
var password = prompt('Enter Password','');
if (password = 'pass')
{
document.location.href="Nextpage";
}

}
 
Back
Top