If you just need a simple yes or no for correct user name, use the HTML name attribute on the form tag, and the input tags, and JavaScript can access them in the form
myElement= document.forms["myform"]. myElement.value;
(added a space so it doesn't cut off, right before myElement.value)
which would get the value of the input named myElement in the form named myform and assign it to the variable myElement.
Then just use a conditional like
if(myElement=="username")
{
//some code
}
and repeat for pass.
this is a really bad idea though. You should use a server side language for this, or anyone can just look at the source code of the page to see the username and pass.