return
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <script type="text/javascript"> (function (a) { if(a==2){ alert("a==2"); return ;//结束函数(跳出函数) } if(a==3){ alert("a==3"); return ;//结束函数(跳出函数) } if(a==4){ alert("a==4"); return ;//结束函数(跳出函数) } alert("a不等于234会弹出这个") })(8) </script> </body> </html>
 
                    
                     
                    
                 
                    
                
 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号