2
The space key also becomes a character?
My problem is that even if in input #userChat there is only the space key it even so gives the alert(), and it ends up being a big problem..
Keys: Space and Line Break. I need that I can only give one alert if you’ve actually written something, Characters, Letters, numbers, symbols, all sorts.
$('.butSend').click(function() {
var mensagem = $("#userChat").val();
var n = mensagem.length;
if(n > 0){
alert(mensagem);
}
});
Thanks for the help. ;)
– Pedro Quezado