javascript login code code example
Example 1: html login page
<html>
<head>
<title>Account</title>
<style>
body
{
background-color:#ffda08;
}
table
{
border:1px white;
margin-top:200px;
margin-left:500px;
background-color:white;
padding:20px
}
#btn
{
width:200px;
height:50px;
background-color:#1ee3d2;
}
</style>
</head>
<body>
<form name=frmNewAcc>
<table border=0 cellspacing=5px>
<tr>
<th colspan=3><input class=in =text name=txtuname placeholder="Enter your account name"></th>
</tr>
<tr>
<th colspan=3><input class=in type=password name=txtupass placeholder="Enter your new password"></th>
</tr>
<tr>
<th colspan=3><input class=in type=password name=txtuconfirmpass placeholder="Enter confirmed password"></th>
</tr>
<tr>
<th colspan=3><input id=btn type=button value="Create new account"></th>
<a href="Login task 1.html">Go back to login</a>
</tr>
</table>
</form>
</body>
</html>
Example 2: html login scripts
<form action="action_page.php" method="post">
<div class="imgcontainer">
<img src="img_avatar2.png" alt="Avatar" class="avatar">
</div>
<div class="container">
<label for="uname"><b>Username</b></label>
<input type="text" placeholder="Enter Username" name="uname" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw" required>
<button type="submit">Login</button>
<label>
<input type="checkbox" checked="checked" name="remember"> Remember me
</label>
</div>
<div class="container" style="background-color:#f1f1f1">
<button type="button" class="cancelbtn">Cancel</button>
<span class="psw">Forgot <a href="#">password?</a></span>
</div>
</form>
Example 3: javascript login system
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
password : '',
database : 'nodelogin'
});