Jquery mobile jquery手机播放声音onclick

Jquery mobile jquery手机播放声音onclick,jquery-mobile,html5-audio,Jquery Mobile,Html5 Audio,我正在用HTML5和jQuery mobile为智能手机开发一个web应用程序,我的页面中有5个按钮(5个选项),所以我想为每个按钮播放不同的嘟嘟声。 我该怎么做 在HTML中的某个地方: <button id="button1Id">Button 1</button> 然后,您可以对所有不同的按钮重复此代码。我没有包括音频播放的代码,因为问题中不清楚您是否需要帮助。有几种方法可以实现它,例如,您可以使用:看看这个问题 $("#button1Id").click( fu

我正在用HTML5和jQuery mobile为智能手机开发一个web应用程序,我的页面中有5个按钮(5个选项),所以我想为每个按钮播放不同的嘟嘟声。
我该怎么做

在HTML中的某个地方:

<button id="button1Id">Button 1</button>

然后,您可以对所有不同的按钮重复此代码。我没有包括音频播放的代码,因为问题中不清楚您是否需要帮助。有几种方法可以实现它,例如,您可以使用:

看看这个问题
$("#button1Id").click( function (event) {
    //Prevent the default button action (I suppose the default click sound is,
    //if it exists on thedevice, is removed by this)
    e.preventDefault(event);

    //TODO: Insert code for audio file playback here

    $.mobile.changePage("destination.html");
}