Code
<OBJECT id="objPlay" type="application/x-oleobject" standby="Loading Windows Media Player components" width="400" classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6">
<param NAME="URL" VALUE="">
<param NAME="rate" VALUE="1">
<PARAM NAME="balance" VALUE="0">
<PARAM NAME="currentPosition" VALUE="0">
<PARAM NAME="defaultFrame" VALUE="">
<PARAM NAME="playCount" VALUE="99">
<PARAM NAME="autoStart" VALUE="-1">
<PARAM NAME="currentMarker" VALUE="0">
<PARAM NAME="invokeURLs" VALUE="-1">
<PARAM NAME="baseURL" VALUE="">
<PARAM NAME="volume" VALUE="100">
<PARAM NAME="mute" VALUE="0">
<PARAM NAME="uiMode" VALUE="full">
<PARAM NAME="stretchToFit" VALUE="0">
<PARAM NAME="windowlessVideo" VALUE="0">
<PARAM NAME="enabled" VALUE="-1">
<PARAM NAME="enableContextMenu" VALUE="0">
<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="4763">
<PARAM NAME="_cy" VALUE="4763">
</OBJECT>
上面是播放器代码,下面是调用代码
Code
<script language="javascript" type="text/javascript">
function play()
{
var obj = document.getElementById("objPlay");
var type = document.getElementById("hdnType").value;
if(type == "1")
{
obj.style.height = 65;
}
else
{
obj.style.height = 400;
}
var urls = document.getElementById("hdnUrl").value;
obj.url = urls;
}
</script>
还可以参考:
http://blog.sina.com.cn/s/blog_4a60e7b3010007qi.html
http://blog.sina.com.cn/s/blog_4a60e7b3010007qh.html~type=v5_one&label=rela_prevarticle
http://www.ninedns.com/Javascript/20074221808025928.html 参数说明