<!DOCTYPE html>
<html xmlns="http://www.w3.org/xhtml/1999">
<head>
<script type="text/javascript" src="jquery-1.6.4.js"></script>
<script type="text/javascript">
var a = ['aaaa','bbbb','cccc'];
$.each(a,function(i,val){
alert( typeof(a)+"---> "+i+" : "+typeof(val)+" : "+val);
});
</script>
</head>
<body>
</body>
</html>
js:
var a = ['aaaa','bbbb','cccc']; // 数组 $.each(a,function(i,val){ //迭代 // i ---> 下标 // val ---> a[i] alert( typeof(a)+"---> "+i+" : "+typeof(val)+" : "+val); });