Tag: 推送

jquery推送制作多维数组

我看过其他类似的post没有任何帮助,它们都是从已经制作的多维数组开始的,我想通过使用.push神奇地制作一个。 我的arrays: ItemsArray.push({ RoomName : RoomName, Item : {//this is where I want the multi-array } }); 我尝试使用: ItemsArray.Item.push{ stuff:morestuff }但它停止说’ItemsArray.Item’没有定义……这显然是荒谬的? 还试过: ItemsArray[1].push{}同样的错误…… 当然这肯定是一个愚蠢的简单问题。 谢谢!

jQuery从列表中获取img源属性并推送到数组中

我有这个缩略图列表,并希望将图像路径(源)推送到一个数组:tn_array