我有一些代碼:$(xml).find("strengths").each(function() { //Code //How can i escape from this block based on a condition.});如何根據條件從“每個”代碼塊中退出?更新:如果我們有這樣的事情怎么辦:$(xml).find("strengths").each(function() { $(this).each(function() { //I want to break out from both each loops at the same time. });});是否有可能從內部的“每個”功能中同時脫離這兩個“每個”功能?#19.03.2013如果您想繼續而不是爆發return true;
如何從JQuery中的each()函數中斷/退出?
溫溫醬
2019-10-23 14:25:03