标签:blog code span 用法 log class logs bsp ons
var obj = { one:1, two:2, three:3}; $.each(obj, function(key, val) { console.log(key);//one two three console.log(val); //1 2 3 }); var arr1 = [ "aaa", "bbb", "ccc" ]; $.each(arr1, function(i,val){ console.log(i); //0 1 2 console.log(val);//aaa bbb ccc });
标签:blog code span 用法 log class logs bsp ons
原文地址:http://www.cnblogs.com/xiaozhumaopao/p/6296972.html