html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<html lang="en">
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Login - ¿ ? project</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css"/>
</head>
<body>
<div class="container">
<h1>Sign In</h1>
<form method="post">
<p> <label for="username">Username:</label> <input type="text" name="username" id="username" autocomplete='off' spellcheck='false' autocorrect='off'> </p>
<p> <label for="password">Password:</label> <input type="password" name="password" id="password"/> <i class="bi bi-eye-slash" id="togglePassword"></i> </p>
<button type="submit" id="submit" class="submit">Log In</button>
</form>
</div>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
* {
margin: 0px;
padding: 0px;
box-sizing: border-box;
outline: none;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
user-select: none;
overflow: auto;
border: none;
text-overflow:auto;
}
:focus {
outline: none !important;
box-shadow: none;
}
input:-webkit-autofill,
input:-webkit-autofill:focus,
input:-webkit-autofill:hover,
select:-webkit-autofill,
select:-webkit-autofill:focus,
select:-webkit-autofill:hover,
textarea:-webkit-autofill,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:hover {
border-color: #5792da;
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
onload=function(){const togglePassword = document.querySelector("#togglePassword");
const username = document.querySelector("#username");
const password = document.querySelector("#password");
username.focus();
togglePassword.addEventListener("click", function () {
// toggle the type attribute
const type = password.getAttribute("type") === "password" ? "text" : "password";
password.setAttribute("type", type);
// toggle the icon
this.classList.toggle("bi-eye");
password.focus();
});
// prevent form submit
const form = document.querySelector("form");
form.addEventListener('submit',function(e){
e.preventDefault();
});}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run