Try using this revised version of the play () function
function play()
{
var embed=document.createElement('object');
embed.setAttribute('type','audio/wav');
embed.setAttribute('data', 'c:\test.wav');
embed.setAttribute('autostart', true);
document.getElementsByTagName('body')[0].appendChild(embed);
}
The problem with your code was that you used the src attribute, which is for the <embed> tag. Instead, use the data attribute for the <object> tag.
If you are trying to get more compatibility from this, you should also consider adding an embed tag as an alternative to an object tag. The way it works is as follows:
<object data="test.wav" type="audio/wav" autostart="true">
<embed src="test.wav" autostart="true" alt="Could not load audio" />
</object>
noscript, , , embed.