0

我想在我洗牌图像列表后获得alt=""一个数组中的所有值!但我总是得到保存价值!为什么?

$('ul').shuffle(); //this will shuffle the list

var a = {};
$("ul img").each(function() {
  a[this.alt] = $(this).attr("alt");
});


$.operation(a, shuffle);
4

1 回答 1

0
$('ul').shuffle(); //this will shuffle the list

var a = new Array();
$("ul > img").each(function(i) {
  a[i] = $(this).attr("alt");
});


$.operation(a, shuffle);
于 2010-04-27T03:55:56.050 回答