在网页中播放 mp3 的实例
2011-06-13 22:10 音乐让我说 阅读(693) 评论(0) 编辑 收藏 举报主要代码如下:
<!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> <script type="text/javascript" src="../avreloaded/swfobject.js"></script> <script type="text/javascript" src="../avreloaded/avreloaded.js"></script> <script type="text/javascript" src="../avreloaded/silverlight.js"></script> <script type="text/javascript" src="../avreloaded/wmvplayer.js"></script> <script type="text/javascript" src="../js/playerCommon.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>播放mp3的示例</title> <style type="text/css"> .divJavaScriptDisabled { background-color: red; color: white; width: 160px; } .divLowFlashVersion { background-color: red; color: white; width: 160px; visibility: hidden } </style> </head> <body> <!-- AllVideos Reloaded Plugin (v1.2.4.1054) starts here--> <ins> <noscript> <div class="divJavaScriptDisabled"> <strong>JavaScript 被禁用了!</strong> <br />为了显示本网页中的内容,请您启用您的浏览器的 JavaScript </div> </noscript> </ins> <!-- 第一个播放器 --> <div id="div1" class="allvideos"> <script type="text/javascript"> document.write(strLowFlashVersionHtml); </script> </div> <script type="text/javascript"> configObjA.file = '../images/audio/Retail1.1.mp3'; swfobject.embedSWF(mediaplayerPath, 'div1', width, height, versionNum, expressinstallPath, configObjA, configObjB, configObjC); </script> <br /><br /><br /><br /> <!-- 第二个播放器 --> <div id="div2" class="allvideos"> <script type="text/javascript"> document.write(strLowFlashVersionHtml); </script> </div> <script type="text/javascript"> configObjA.file = '../images/audio/Retail1.1.mp3'; swfobject.embedSWF(mediaplayerPath, 'div2', width, height, versionNum, expressinstallPath, configObjA, configObjB, configObjC); </script> </body> </html>
文件下载:https://files.cnblogs.com/Music/PlayAudio%EF%BC%88by_Bruce%EF%BC%89.rar
谢谢浏览!
作者:音乐让我说(音乐让我说 - 博客园)
出处:http://music.cnblogs.com/
文章版权归本人所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。