How can I play开发者_高级运维 an mp3 or wav sound using the jquery click event?
i want to add click sound not any track or song
You might find the jQuery Sound Plugin of use:
This is a simple sound player, it uses flash to play the sounds, but DOES NOT provide a flash interface for any controls, everything is controlled via jQuery
$("#sound").sound({swf: url}); $("#sound").load(url); $("#sound").play(); $("#sound").pause(); $("#sound").stop(); $("#sound").volume(0-100);
You can't use DHTML to play sound. You can use a flash player like this one.
精彩评论