我有一些代码:
$(xml).find("strengths").each(function() {
//Code
//How can i escape from this block based on a condition.
});
Run Code Online (Sandbox Code Playgroud)
如何根据条件从"每个"代码块中逃脱?
如果我们有这样的事情怎么办:
$(xml).find("strengths").each(function() {
$(this).each(function() {
//I want to break out from both each loops at the same time.
});
});
Run Code Online (Sandbox Code Playgroud)
是否有可能从内部"每个"功能中突破"每个"功能?
#19.03.2013
如果你想继续而不是爆发
return true;
Run Code Online (Sandbox Code Playgroud)