Home > Web Front-end > JS Tutorial > Parse prototype, method to jump out of each loop in JQuery_jquery

Parse prototype, method to jump out of each loop in JQuery_jquery

WBOY
Release: 2016-05-16 17:09:36
Original
952 people have browsed it

Copy code The code is as follows:

function chk(){
         var flag=true;
var msg='';
var tips={'username':'Name','tel':'Telephone','company':'Company Name','loupan_name':' Property name','sdate':'Group purchase time','content_1':'Group purchase content'};
         $$('.required').each(function(el){
                                                                                                                               el).blank()){
           msg = 'Please enter' tips[$(el).readAttribute('id')] '!nn';
        }
                                                                                                                                                                                                                        

}
Throw $break to break out of each loop


Use
in Jquery

return false;

To jump out of this loop, use continue

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template