login using javascript 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: login page code in javascript

<!DOCTYPE html>
  <html>
  <head>
  <title>Welcome To Login Form</title>
  </head>

	<body>
	<!-- Main div code -->
	<div id="main">
	<div class="h-tag">
	<h2>Welcome To My Account Login</h2>
	</div>
	<!-- Login box -->
	<div class="login">
	<table cellspacing="2" align="center" cellpadding="8" border="0">
	<tr>
	<td>Enter User Name :</td>
	<td><input type="text" placeholder="Enter user name here" id="email" class="tb" /></td>
	</tr>
	<tr>
	<td>Enter Password :</td>
	<td><input type="password" placeholder="Enter Password here" id="pwd1" class="tb" /></td>
	</tr>
	<tr>
	<td></td>
	<td>
	<input type="submit" value="Reset" onclick="clearFunc()" class="btn" />
	<input type="submit" value="Login" class="btn" onClick="login()" /></td>
	</tr>
	</table>
	</div>
  	 <!-- login box div ending here.. -->
	</div>
	<!-- Main div ending here... -->
    
  </body>
  </html>

Example 3: login html

{% extends '!!!!!ALERT_CHANGE_THIS_ALERT!!!!!!!/base.html' %}
{% load crispy_forms_tags %}

{% block title %}
<title>Login</title>
{% endblock %}

{% block body %}
<div class="container">
    <div class="row justify-content-center mt-5">
        <div class="col-5 border shadow rounded p-4">
            <h1 class="font-weight-lighter text-center">Login</h1>
            <form method="POST">
                {% csrf_token %}
                {{ form | crispy }}
                <button class="btn btn-outline-secondary btn-block mt-4">
                    Login
                </button>
            </form>
        </div>
    </div>
</div>
{% endblock %}

Tags:

Html Example