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');

相关文章: