make sure的意思中文:想向一个空白页面动态地插入一个播放器

来源:百度文库 编辑:高考问答 时间:2024/05/05 01:58:11
我想向一个空白页面动态地插入一个播放器~~
我写的代码如下:(用了javascript和innerHTML)
<body>
------------------(javascript)
<script langue="javascript">
function change(){
fff.innerHTML='<embed src="视频路径" width=530 height=400></embed>'}
</script>
--------------------
<div id=fff></div>
<input type="button" onclick="change()" value="插入播放器">
</body>
播放器是写进了,但播放不了影片~~(播放器代码是没有问题的)

var playerwmv='<div style="height:6px;overflow:hidden"></div><object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" type="application/x-oleobject" standby="Loading..." width="480" height="350"><param name="FileName" VALUE="http://www.cuiz.net/mtv/***.wmv" /><param name="ShowStatusBar" value="-1" /><param name="AutoStart" value="true" /><param name="enableContextMenu" value="0" /><embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://www.cuiz.net/mtv/***.wmv" autostart="true" width="480" height="350" /></object>';

document.getElementById(id).innerHTML = playerwmv;

上面的ID为你的网页中的唯一ID。

???我只晓得那个播放器都没有调用