日期:2014-05-16 浏览次数:20298 次
<script type="text/javascript"> $(function () { var arr = [3, 2, 5]; $.map(arr, function (item) { return item * 2; }).each(function (i) { alert(i); }); }); </script>
<script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $(function () { var arr = [3, 2, 5]; arr = $.map(arr, function (item) { return item * 2; }) $.each(arr, function (i,k) { alert(k); }); }); </script>