我正在尝试根据用户输入计算字符串并显示一些消息:
$('#myInput').keyup(function() {
if(this.value.length<=158)
$('#charCount').text('We will deduct 1 credit from your account');
else if(this.value.length>158 || this.value.length<316)
$('#charCount').text('We will deduct 2 credit from your account');
else if(this.value.length>316 || this.value.length<400)
$('#charCount').text('We will deduct 3 credit from your account');
});
问题是最后一个else if
不工作......我错过了什么吗?