0
다음 HTML-JavaScript 코드에서 작동하도록 사운드를 얻으려고합니다 ...하지만 소리가 나지 않으며 프로그램이 "소리 지원 없음"을 말하지 않습니다. 문제가 무엇인지 확실하지 않습니까 ??HTML 사운드가 재생되지 않습니까?
<html>
<head>
<title>Sound Test</title>
<script type="text/javascript">
function PlaySound(){
var sound = document.getElementById("note_c1");
try{
//RealPlayer
sound.DoPlay();
}catch (e){
try{
//Windows Media/Quicktime
sound.Play();
alert("should hear sound");
}catch(e){
alert("No sound support.");
}
}
}
</script>
</head>
<body>
<h1>Sound Test</h1>
<embed id="note_c1" src="c1.au" width="0" height="0" autostart="false" enablejavascript="true"/>
<input type = "button" value="Play the Sound" onClick="PlaySound()">
</body>
사용중인 브라우저를 알 수 있습니까? – Unknown