Hi I'm making a "secure password" project for school and I need help to check if a user input has "!@$%&#" and if they have it tell them their password is secure.
This is a project for school Im stuck doing this :(
var password = document.getElementById('password');
var eMsg = document.getElementById('feedback');
var minLength = 6;
function checkPass() {
if (password.value.length < minLength) {
eMsg.innerHTML = 'Password must have' + minLength + 'characters or more';
} else {
eMsg.innerHTML = '';
}
}
<html>
<head>
<title> Password Secured </title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1 class="logo"> logo</h1>
<br/>
<br/>
<p class="input">Please type your password: <br/> <input type="text" id="password" />
<div id="feedback"></div>
</p>
<br/>
<p class="answer"></p>
<br/>
<br/>
<p class="tips"> <br/>Tips tips tips </p>
</body>
</html>