Tuesday, November 8, 2011

How To Add background Music to your Website

Same as the Music player,this will also play music,but the different is that,in MP3 Player,you were having the choice of playing and pausing,but here,the song will keep on playing,and you have no other choice,instead of listning to it.the other difference between these two is that,we put the MP3 Player code in the <body> section,but the code for Background Music is added to the <head> section.

The coding for it would be:




Why are we giving loop?

loop here means,how many times we want the song to be played,1 time,2 time or any other,for 1 and 2 time we will give the loop 1 and 2,as we all know -1 will never come,so it will keep on playing the song for ever.

The biggest drawback in this is that,it only works on Internet Explorer,and not on Mozilla or Chrome,i havent checked any other browser.

0 comments:

Post a Comment