jquery each 遍历 终止


return false;——相当于 javascript 中的 break 效果。

return true;—— 相当于 javascript 中的 continue 效果

$(view.table.data()).each(function (index,rowdata) {
                                    if(rowdata.id == serverId){
                                    	 statusCell = view.table.cell(index, "status:name");//获取状态列statusCell
                                         statusCell.data("DELETING");
                                         return false;
                                    }
                                 });

猜你喜欢

转载自huangqiqing123.iteye.com/blog/2410271