开发者

jQuery or Java sound notification / alert

I have a link <a href="#" id="button">click</a> on my page and I want to play a noti开发者_开发知识库fication or alert beep on click. How can I do this using jQuery?


use the jQuery sound plugin.


You can use HTML5's audio element.

HTML5 audio on Nettuts - there is a jQuery example


You don't need jQuery..

<BGSOUND ID="SOUND_ID" LOOP=1 VOLUME="-200" SRC="mySound.mid">

document.all['SOUND_ID'].src='mySound.mid';

If you need a more fancy player you will need to embed on of those Flash player and pass your mp3 file as source. Search for it, there are many.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜