图像预载

<html><head><title>Preloaded Rollover</title>
<script type = "text/javascript">
<!-- hide me from older browsers

var some_image = new Image();
some_image.src = "happy_face.gif";

// show me -->
</script>
</head>
<body>
<img src = "sad_face.gif" name = "my_first_image" 
  onMouseOver = "window.document.my_first_image.src = 'happy_face.gif';"
  onMouseOut = "window.document.my_first_image.src = 'sad_face.gif';">
</body>
</html>