People because this condition does not work ?? It's something simple but by not knowing javascript I'm catching up.
function QTDsenha(){
var senha = document.getElementById('idSenha');
if(senha.value < 6){
alert('Informe uma senha com no mínimo 6 caracteres');
}
}
<output>Senha<output>
<input id="idSenha" onblur="return QTDsenha()">