播放音乐的脚本 :: 程序串串烧

播放音乐的脚本 时间:2004-06-21 <SCRIPT LANGUAGE="VBScript"> dim lngMP70 function Listen(str) //str是歌曲路径 On Error Resume Next lngMP70 = IsObject(CreateObject("WMPlayer.OCX")) lngMP70 = false ' Windows Media Player 7 Code If (lngMP70) Then document.write "<OBJECT ID=MediaPlayer " document.write " CLASSID=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" document.write " standby=""Loading Microsoft Windows Media Player components..."" " document.write " TYPE=""application/x-oleobject"" width=""310"" height=""64"">" document.write "<PARAM NAME=""url"" VALUE=""" + str+ """>" document.write "<PARAM NAME=""AutoStart"" VALUE=""true"">" document.write "<PARAM NAME=""ShowControls"" VALUE=""1"">" document.write "<PARAM NAME=""uiMode"" VALUE=""full"">" document.write "</OBJECT>" ' Windows Media Player 6.4 Code Else document.write "<OBJECT ID=MediaPlayer " document.write " CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" document.write "CODEBASE=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" document.write " standby=""Loading Microsoft Windows Media Player components..."" " document.write " TYPE=""application/x-oleobject"" width=""310"" height=""64"">" document.write "<PARAM NAME=""FileName"" VALUE=""" + str+ """>" document.write "<PARAM NAME=""ShowDisplay"" VALUE=""false"">" document.write "<PARAM NAME=""AutoStart"" VALUE=""true"">" document.write "<PARAM NAME=""ShowControls"" VALUE=""1"">" document.write "<PARAM NAME=""PlayCount"" VALUE=""3"">" document.write "<PARAM NAME=""ShowStatusBar"" VALUE=""1"">" document.write "</OBJECT>" End If end function window.focus() call Listen(str) </SCRIPT> yizdream 引用Trackback(0) | 编辑 评论 发表评论 用户名: Email: 主页: 最后更新 编程规范 To m c a t和I I S的配合 To m c a t和A p a c h e的配合 播放音乐的脚本 MySQL数据的导出和导入工具:mysqldump 使用ArrayList让String[]数组不固定 embed和bgsound的某些用法 .Net 创建可编辑ListView控件 解决java/jsp乱码的一种转换方法 让tomcat一运行就开始调用某个java类

原始快照:web.archive.org