var arr = ["北京","上海","天津","重慶","河北","河南","安徽","湖北","湖南"]; $.each(arr, function(i, val) { console.log(i+"-- --"+val); }); var obj= {name:"小明",male:"男"} ...
var arr = ["北京","上海","天津","重慶","河北","河南","安徽","湖北","湖南"];
$.each(arr, function(i, val) {
console.log(i+"-- --"+val);
});
var obj= {name:"小明",male:"男"};
$.each(obj, function(i, val) {
console.log(i+"-- --"+val);
});
function handle(param){
$.each(param, function(i, val) {
console.log(i+"-- --"+val);
});
}