javscript login form code example
Example 1: 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 %}
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>