how to make a functional redirecting login with css/html/java

  css, html, javascript, passwords, username

I have a page in html, I have put a username and password box and a login button, if the login details are correct I want the login button to redirect to a page on the site, and if the login is incorrect, redirect to a 404/other page, can I do this in html/css/java only?

Source: Ask Javascript Questions