jQuery 跳出each循环

jquery跳出each循环,要实现break和continue的功能:

break用returnfalse;

continue用returnture;

jquery跳出each循环实例

var arr = [ "abc", "ef","gggg"];
$.each(arr, function(index, value){
  if (this == "abc")
    return false;
  }
);

相关推荐