Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有网格视图显示 3 个图像第一个 1 被删除我想循环通过网格视图图像并将它的 src 放入数组但忽略删除此图像的图像显示我真正遇到的
var arr = []; $('#container').find('img,[type=image]').each(function() { arr.push(this.src); // stores the absolute src // arr.push($(this).attr('src')); // stores the original HTML attribute });