缓存imgs的数组并在使用其中一些之后[重复](Caching array of imgs and after using some of them [duplicate])
这个问题在这里已有答案:
如何在Javascript 8答案中 缓存图像有没有办法在加载时缓存图像,并在需要时从缓存中使用它们。
我正在使用jquery。
This question already has an answer here:
How do you cache an image in Javascript 8 answersIs there any way to cache images on load and use them from cache when they are needed.
I am using jquery.
最满意答案
你可以用这样的javascript缓存(或预加载)一个图像:
<script> img1= new Image(); img1.src="yourimagefile.jpg"; </script>you can cache (or pre-load) an image with javascript like this:
<script> img1= new Image(); img1.src="yourimagefile.jpg"; </script>更多推荐
发布评论