示例 1 : 遍历
<script src="http://how2j.cn/study/jquery.min.js"></script>
<script>
var a = new Array(1,2,3);
$.each( a, function(i, n){
document.write( "元素[" + i + "] : " + n + "<br>" );
})
document.close();
</script>
示例 2 : 去除重复
<script src="http://how2j.cn/study/jquery.min.js"></script>
<script>
var a = new Array(5,2,4,2,3,3,1,4,2,5);
a.sort();
$.unique(a);
$.each( a, function(i, n){
document.write( "元素[" + i + "] : " + n + "<br>" );
})
document.close();
</script>
示例 3 : 是否存在$.inArray
<script src="http://how2j.cn/study/jquery.min.js"></script>
<script>
var a = new Array(1,2,3,4,5,6,7,8);
document.write($.inArray(9,a));
document.close();
</script>