兼容chrome和ie的音乐播放
2014-10-20 15:53
274 查看
兼容chrome和ie的音乐播放(Ie7 Ie8 Ie9 均测试过 )
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>aa</title> <script> function playSound(){ var snd_ie = document.getElementById('snd_ie'); snd_ie.src = "./alert.wav" var snd_chrome = document.getElementById('snd_chrome'); snd_chrome.data = "./alert.wav" } function stopSound(){ var snd_ie = document.getElementById('snd_ie'); snd_ie.src = "" var snd_chrome = document.getElementById('snd_chrome'); snd_chrome.data = "" } </script> </head> <body> <bgsound id='snd_ie' src="" loop=-1></loop> <object id='snd_chrome' width="0px" height="0px" type="audio/x-wav" data=""></object> <input type="button" value="开始" onclick="playSound()"> <input type="button" value="暂停" onclick="stopSound()"> </body> </html>
相关文章推荐
- 播放音乐方法(兼容IE FF Chrome Opera Safari)
- 播放音乐方法(兼容IE FF Chrome Opera Safari)
- 兼容chrome和ie的wav音乐播放(Ie7 Ie8 Ie9 均测试过 )
- 网页上播放声音的简单实现(兼容IE/CHROME)
- js + php 读取、播放视频流 兼容firefox,chrome,ie,mac的safari,ios的safari,ios的微信浏览器(文件读取文件流篇) 分类: php javascript jwplayer6 视频流 视频 safari
- js + php 读取、播放视频流 兼容firefox,chrome,ie,mac的safari,ios的safari,ios的微信浏览器(文件读取文件流篇)
- js + php 读取、播放视频流 兼容firefox,chrome,ie,mac的safari,ios的safari,ios的微信浏览器(curl读取文件流篇) 分类: php javascript 浏览器兼容 safari 视频流 jwplayer6
- js + php 读取、播放视频流 兼容firefox,chrome,ie,mac的safari,ios的safari,ios的微信浏览器(curl读取文件流篇)
- 兼容IE-FireFox-Chrome的背景音乐播放
- 兼容IE和chrome的.wav音频文件在线播放
- 兼容IE & Firefox 的脚本改本属性值的检测方法 [ 不支持Chrome ]
- JS直接导出excel 兼容ie、chrome、firefox
- 兼容IE、新版Chrome、Firefox,实现本地图片等比例缩放预览
- javascript 实现禁止右键,复制,选取文本 (兼容firefox,IE,chrome等主流浏览器)
- 【javascript动画系列之网页白板】javascript实现的白板(兼容ff,ie,chrome,……)
- ahjesus 获取div编辑框,textarea,input text的光标位置 兼容IE,FF和Chrome
- JS 回车提交,兼容IE、火狐、Opera、Chrome、Safari……
- PDF在线预览 ,兼容IE,chrome。使用了pdfobject.js
- js本地图片预览,兼容ie[6-9]、火狐、Chrome17+、Opera11+、Maxthon3
- IE兼容问题解决方案——指定文件兼容性为content="IE=Edge,chrome=1"(可以解决很多的问题)