pcajax
1.前台js
<script type="text/javascript">
function playMusic(width,height,isStart,videolink)
    {
     var oeTags = \'<object id="mediaPlayer" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"\'
         + \'width="\' + width + \'" height="\' + height + \'"\'
         + \'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"\'
         + \'standby="Loading Microsoft Windows Media Player components..."\'
         + \'type="application/x-oleobject">\'
         + \'   <param name="autoStart" value="\'+isStart+\'"/>\'
         + \'   <param name="url"       value="\' + videolink + \'" />\'
         + \'   <param name="wmode"     value="transparent" />\'
         + \'   <param name="uiMode"    value="full" />\'
         + \'   <param name="loop"      value="false" />\'
         + \'   <embed id       ="EmbedmediaPlayer"\'
         + \'       type        ="application/x-mplayer2"\'
         + \'       src         ="\' + videolink + \'"\'
         + \'       width       ="\' + width + \'"\'
         + \'       height      ="\' + height + \'">\'
         +\'        autoStart   ="\'+isStart+\'" \'
         + \'   </embed>\'
         + \'</object>\';
    document.write(oeTags);
    }
</script>
2.后台cs
 protected void BtnStop_Click(object sender, EventArgs e)
        {
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script>playMusic(0,0,false,\'天路.wma\')</script>");
        }

可以更换数据库中的路径,及大小,是否显示。

分类:

技术点:

相关文章:

  • 2021-11-30
  • 2021-12-16
  • 2021-06-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2021-12-16
猜你喜欢
  • 2021-06-20
  • 2021-06-15
  • 2021-06-25
  • 2021-12-06
  • 2021-10-28
  • 2021-12-25
相关资源
相似解决方案