Jump to content

Help!


Mengao

Recommended Posts

I was trying to make a simple login code but it's not working. Does anyone know what did I do wrong?

<html><body><script type="text/javascript">function login(){if (user==="test" && pass==="test")document.write('Hello, welcome' +user+ '; What would you like to do?')}{elsealert('Your password is wrong!')} </script><input type="text" name="user" value="" id="pass" /><input type="password" name="pass" value="" id="pass" /><input type="button" name="login" value="Login" onclick="login()" /></body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...