javascript html how to make password field visible code example

Example: how to make password visible in password javascript

<!DOCTYPE html>
<html>
<head>
    <title>Toggle Password Visibility</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
    <div class="container">
        <h1>Toggle Password Visibility</h1>
        <input type="password" name="password" id="password" placeholder="Enter the password">
        <i class="far fa-eye" id="togglePassword"></i>
    </div>
    <script src="js/app.js"></script>
</body>
</html>Code language: HTML, XML (xml)

Tags:

Html Example