日期:2014-05-16  浏览次数:20340 次

js跳出循环 评价js验证

? var isNotEvaluated = false;
?$('.sel').each(function(index){
??alert($(this).val()));
??if($(this).val() == ''){
?? isNotEvaluated = true;
?? return false;? //?跳出循环
??}
? }
?);
?
?if(isNotEvaluated){
??? alert('请完成日常评价!');
??? return;
?}

?

?

?

<div class='sel'>

</div>