Giving background music to a webpage

Posted by rag on Stack Overflow See other posts from Stack Overflow or by rag
Published on 2010-03-22T10:56:24Z Indexed on 2010/03/22 11:01 UTC
Read the original article Hit count: 341

Filed under:
   var musicsrc="jyothir2.mp3";
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<bgsound src='+'"'+musicsrc+'"'+' loop="infinite">')
else 
document.write('<embed src=\"'+musicsrc+'\" hidden="true" border="0" width="20" height="20" autostart="true" loop="infinite">')

friends my javascript( for background music) codes is producing a continuous music in IE but the music is not continuous in other browsers.. can anybody tell me why is it so?

© Stack Overflow or respective owner

Related posts about JavaScript