非空与 jquery.each

return ;只能跳出each方法 ,无法跳出aaa()

 

 

function aaa{

  var result = false;
            //非空
            $("input[type='text']").each(
                     function () {
                         if ($(this).val().length <= 0) {
                             parent.layer.msg('当前选项不能为空!', { icon: 5 });
                             $(this).focus();
                             result = true;
                        
                         }
         
                     });
}

posted @ 2017-07-21 18:59  越过那个限制  阅读(154)  评论(0编辑  收藏  举报