你好,我是在客戶端編程和HTML升技新, 我試圖EXCUTE在Firefox和其他瀏覽器下面一行,則代碼應該 播放聲音,問題是代碼的工作和娛樂這裏的聲音在IE和Chrome,但不是Firefox是我的代碼:火狐不播放聲音
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Untitled 1</title>
<script type="text/javascript">
function playsound()
{
var sound= document.getElementById("check");
sound.play();
}
</script>
</head>
<body>
<audio id = "check" preload = "auto">
<source src = "check.mp3" type = "audio/mpeg"></audio>
<input type="button" onclick="playsound()" value="play">