Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>username and password</title>
- <script type="text/javascript">
- function test()
- {
- uname=document.frmlogin.user;
- pd=document.frmlogin.pwd;
- if(uname value==" ")
- {
- alert("enter password");
- uname.focus();
- return false;
- }
- if(pd.value.lenght<b)
- {
- alert("plz enter atleast 6 characters for password");
- pd.focus();
- return false;
- }
- return true;}
- </script></head>
- <body>
- <h3>login form </h3>
- <form name ="formlogin" onsubmit="return test()">
- Username:<input type="text" name="user"><br>
- Password:<input type="password"name="pwd"><br>
- <input type="Submit" Value="Submit">
- </form>
- </today>
- </html>
Add Comment
Please, Sign In to add comment