Home > Javascript > Preload Images

<script type="text/javascript">

function preloadImages()
{
var images = [];
var args = preloadImages.arguments;
for (i = 0; i < args.length; i++) {
images[i] = new Image();
images[i].src = args[i];
}
}

preloadImages("image1.jpg","image2.jpg");

</script>



Flag Counter