【发布时间】:2011-05-21 18:29:30
【问题描述】:
$('input[TYPE="SUBMIT"]').click(function(){
if ($('input[TYPE="TEXT"').val().length===0 || $('textarea').val().length===0)
{
console.log($('input[TYPE="TEXT"').val().length);
console.log($('textarea').val().length);
return false;
}
});
chrome 突出显示我的 if 语句。我真的不明白这里有什么问题。我想我可以为这两个字段添加一个类,但我的布局并不需要它。我是不是写错了?
【问题讨论】:
标签: jquery jquery-selectors if-statement operators