$.fn.sum = function (fun) { var v = 0; if ($(this).length > 0) { $(this).each(function (index, item) { if (fun != null && fun != undefined && typeof (fun) == "function") { v = v + fun(item); } }); } return v; }
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/224524.html原文链接:https://javaforall.net
