1.对象和数组遍历 $.each(object, [callback])
$.each( [0,1,2], function(i, n){
alert( "Item #" + i + ": " + n );
});
2.元素集合遍历 $(ele).each(callback)
$(“ul li”).each(function(index,item){
alert( "index" + index + ": " + item );
});
jQuery each()
最新推荐文章于 2023-11-02 17:58:18 发布