JSFiddle - React, Tailwind, and code Playground
by Guruprasad Rao
HTML
<form name="myForm">
<input type="password" value="" name="userPass" onkeyup="validate()"/>
Strength:<span id="mylocation">no strength</span>
</form>
JavaScript
function validate() {
var msg;
if(document.myForm.userPass.value.length>5){
msg="good";
}
else{
msg="poor";
}
var f=navigator.userAgent.search("Firefox");
if(f>-1)
document.getElementById("mylocation").textContent=msg
else
document.getElementById("mylocation").innerText=msg
}