💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[TOC] ## .each() 语法: ``` jQuery.each( collection, callback(indexInArray, valueOfElement) ) ``` ### 遍历数组 ``` $.each([52, 97], function(index, value) { alert(index + ': ' + value); }); ``` ### 遍历对象 ``` var obj = { "flammable": "inflammable", "duh": "no duh" }; $.each( obj, function( key, value ) { alert( key + ": " + value ); }); ```