<input type="text" name="user" maxlength="10">
我有一些代码:
$("#user").keyup(function(e){
if($("#user").val().length < 4) {$("#spanUser").html("Too Short !");} //works
我该怎么写:
if($("#user").val().length > 0 < 4)... // between 1 and 4
if($("#user").val().length == 10) {play a beep sound;}