这是链接 http://breakbadbutton.com/
基本上你点击按钮,它会播放一个音频文件。我不明白为什么它不能在 iPhone/iPad 上运行......
剧本:
<script type="text/javascript">
$(document).ready(function() {
var sounds = [
"audio/basement.mp3",
"audio/half.mp3",
"audio/science.mp3",
"audio/tone.mp3",
"audio/minerals.mp3",
"audio/sticks.mp3",
"audio/gatorade.mp3",
"audio/roll.mp3",
"audio/right.mp3",
"audio/knocks.mp3",
"audio/hotdogs.mp3",
"audio/keys.mp3",
"audio/heil.mp3",
"audio/money.mp3",
"audio/ours.mp3",
"audio/pass.mp3"],
pickSound = 0;
$("button").click(function() {
$('#soundDiv').html("<embed src=\""+ sounds[pickSound] +"\" hidden=\"true\" autostart=\"true\" />");
pickSound = (pickSound + 1) % sounds.length;
});
});