<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JS播放声音</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<script language="javascript">
playVoice();
function playVoice()
{
var borswer = window.navigator.userAgent.toLowerCase();
if(borswer.indexOf( "ie" ) >= 0)
{
//IE内核浏览器
var strEmbed = '<embed name="embedPlay" src="dingdong.wav" autostart="true" hidden="true" loop="false"></embed>';
if ($("body").find("embed").length <= 0){
$("body").append(strEmbed);
}
var embed
JS播放声音
最新推荐文章于 2024-06-09 21:04:05 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)