Creating an interactive form (Login webpage)
* User name:- my | Password:- teacher
<html>
<head>
<title>Login</title>
</head>
<body>
<script language="Javascript">
function check() {
if (document.login.myname.value === "my" && document.login.mypass.value === "teacher") {
alert("Login Successful");
} else {
alert("Error password or username");
}
}
</script>
<form name="login">
User Name : <input name="myname" type="text" />
Password : <input name="mypass" type="password" />
<input onclick="check()" type="button" value="Login" />
</form>
</body>
</html>
Related Topics:
- JavaScript Introduction
- Variables in JavaScript
- JavaScript Function
- Accessing JavaScript Function
- Creating JavaScript interactive form
- Accessing form field value
- Creating interactive form login webpage
- Networking Fundamentals
- TCP/IP and Internet addressing
- Internet Working
- Internet Working Servers
- Concept and need for web publishing
- Web languages
- Javascript Control Structure
- Checking Text is Letter/s
- Checking Text is Number/s
- Checking Textbox is Empty or not
- Addition of two numbers
- Subtraction of two numbers
- Multiplication of two numbers
- Division of two numbers
- Form field validations
- Email validation