【发布时间】:2013-07-17 03:57:07
【问题描述】:
我开发了我的第一个诺基亚网络应用程序。我正在尝试播放按钮单击时保存在本地存储中的声音
这是我的代码,但它不起作用
<div class="odd" id="g" onclick="playSound('s40-theme/sounds/piano_G.mp3')"></div>
<script type="text/javascript">
function playSound(file) {
var embed = document.createElement("embed");
embed.setAttribute('src', file);
embed.setAttribute('hidden', true);
embed.setAttribute('autostart', true);
document.body.appendChild(embed);
}
</script>
【问题讨论】:
标签: javascript nokia nokia-s40 playsound