Plug-in JavaScript Chapter 10, Example 81 (Click on the icon to view the source for copy and pasting)
» Run this code now (Right click and select Back to return from the example)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<html><head><title>Plug-in JavaScript: Example 81</title>

<script src="PJ.js"></script>


<span id='sound'></span>

<img id='a1' src='avatar1.jpg'>
<img id='a2' src='avatar2.jpg'>
<img id='a3' src='avatar3.jpg'>
<img id='a4' src='avatar4.jpg'>


window.onload = function()
   ids = Array('a1', 'a2', 'a3', 'a4')
   O(ids, 'onmouseover', bloop)

   function bloop()
      PlaySound('sound', 'bloop.wav', 0)