📜  jquery 中的 foreach 选择器 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:08.337000             🧑  作者: Mango

代码示例1
Use each: 'i' is the postion in the array, obj is the DOM object that you are iterating (can be accessed through the jQuery wrapper $(this) as well).

$('selector').each(function(i, obj) {
    //test
});