• 网页中播放音乐的实现方法代码


    第一种方式:采用wmplayer控件

    <object name="wmplayer" classid=CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95 width=0 height=0
    codebase=http://activex.microsoft.com/ activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701
    height=180 id=MIDIPlayer type=application/x-oleobject VIEWASTEXT standby=" 加载 Microsoft Windows Media Player 组件...">

    <param name="FileName" value=" http://yourURL/xxx.wma">
    <param name="AutoStart" value="true">
    <param name="AutoRewind" value="-1">
    <param name="AnimationAtStart" value="false">
    <param name="ShowControls" value="false">
    <param name="ClickToPlay" value="false">
    <param name="EnableContextMenu" value="true">
    <param name="EnablePositionControls" value="false">
    <param name="Balance" value="0">
    <param name="ShowStatusBar" value="false">
    <param name="AutoSize" value="0">

    <embed type="application/x-mplayer2"
    pluginspage="http:// www.microsoft.com/Windows/ Downloads /Contents/Products/MediaPlayer/"
    filename src autostart="false" enablecontextmenu="false" clicktopla
    y="false" enablepositioncontrols="false" showcontrols="0" showstatusbar="1" showdisplay="0">

    </object>

    第二种方式:html标签,似乎更简单

    <bgsound id='bgsound' src="http://yourURL/xxx.mid" loop=-1 >
      <input type="button" value="停止" onclick="_stop()">
      <input type="button" value="开始" onclick="_start()">
      <script language="JavaScript">
      function _start() {
       bgsound.src="http://yourURL/xxx.mid";
      }
      function _stop(){
       bgsound.src="";
      }
      </scrip>

  • 相关阅读:
    Python网络爬虫与信息提取(二)—— BeautifulSoup
    Linux文件系统概述
    XML简介
    JSON数据格式
    SQL*Loader之CASE8
    SQL*Loader之CASE9
    SQL*Loader之CASE10
    SQL*Loader之CASE11
    Oracle工具之DBNEWID
    Oracle常用函数汇总
  • 原文地址:https://www.cnblogs.com/88223100/p/1282361.html
Copyright © 2020-2023  润新知