例子,jquery循环array与map。
$.each( ['a','b','c'], function(i, l){ alert( "Index #" + i + ": " + l ); });
$.each( { name: "John", lang: "JS" }, function(k, v){ alert( "Key: " + k + ", Value: " + v ); });
CopyRight © 2010-2021 脚本学堂 Jb200.com , All Rights Reserved.