我想在一个.aspx页面中加一个MediaPlayer播放器,想在CS的文件中动态设置播放器的URL值,小弟以知道使用JS来做,但是JS不会,请GGJJ指教。
.aspx播放器部分代码:
<OBJECT id= "MediaPlayer " height= "63 " width= "176 " classid= "CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 "VIEWASTEXT>
<PARAM NAME= "URL " VALUE=MusicURL>
<PARAM NAME= "rate " VALUE= "1 ">
<PARAM NAME= "balance " VALUE= "0 ">
<PARAM NAME= "currentPosition " VALUE= "0 ">
<PARAM NAME= "defaultFrame " VALUE= " ">
<PARAM NAME= "playCount " VALUE= "1 ">
<PARAM NAME= "autoStart " VALUE= "-1 ">
<PARAM NAME= "currentMarker " VALUE= "0 ">
<PARAM NAME= "invokeURLs " VALUE= "-1 ">
<PARAM NAME= "baseURL " VALUE= " ">
<PARAM NAME= "volume " VALUE= "50 ">
<PARAM NAME= "mute " VALUE= "0 ">
<PARAM NAME= "uiMode " VALUE= "mini ">
<PARAM NAME= "stretchToFit " VALUE= "0 ">
<PARAM NAME= "windowlessVideo " VALUE= "0 ">
<PARAM NAME= "enabled " VALUE= "-1 ">
<PARAM NAME= "enableContextMenu " VALUE= "-1 ">
<PARAM NAME= "fullScreen " VALUE= "0 ">
<PARAM NAME= "SAMIStyle " VALUE= " ">
<PARAM NAME= "SAMILang " VALUE= " ">
<PARAM NAME= "SAMIFilename " VALUE= " ">
<PARAM NAME= "captioningID " VALUE= " ">
<PARAM NAME= "enableErrorDialogs " VALUE= "0 ">
<PARAM NAME= "_cx " VALUE= "4657 ">
<PARAM NAME= "_cy " VALUE= "1667 ">
<!-- 文件地址-->
</OBJECT>
------解决方案--------------------------------------------------------
<PARAM NAME= "URL " VALUE=MusicURL>
该成 <PARAM NAME= "URL " VALUE= <%= musicUrl%> >
CS:
定义一个 protected string musicUrl