使用jQuery来预加载图像

mac2022-06-30  44

1 jQuery.preloadImages = function() { 2   for(var i = 0; i < arguments.length; i++) { 3     $("<img />").attr('src', arguments[i]); 4   } 5 }; 6 //用法 7 $.preloadImages('image1.gif', '/path/to/image2.png', 'some/image3.jpg');

转载于:https://www.cnblogs.com/qzsonline/archive/2012/06/19/2554635.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)