加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

在页面中插入flash

发布时间:2020-12-15 06:37:32 所属栏目:百科 来源:网络整理
导读:function insertFlash(elm,url,w,h) { ? ? if (!document.getElementById(elm)) return; ? ? var str = ''; ? ? str += 'object width="' + w + '" height="' + h + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.mac
function insertFlash(elm,url,w,h) {
? ? if (!document.getElementById(elm)) return;
? ? var str = '';
? ? str += '<object width="' + w + '" height="' + h + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0">';
? ? str += '<param name="movie" value="' + url + '">';
? ? str += '<param name="quality" value="autohigh">';
? ? str += '<param name="SCALE" value="exactfit">';
? ? str += '<param name="wmode" value="Opaque">';
? ? str += '<embed width="' + w + '" height="' + h + '" src="' + url + '" quality="autohigh" wmode="Opaque" type="application/x-shockwave-flash" plugspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>';
? ? str += '</object>';
? ? document.getElementById(elm).innerHTML = str;

}


应用举例

<div id="index_flash" align="center">
? ? ? ? <script type="text/javascript">
? ? ? ? ? ? insertFlash('index_flash','/WebResource/HomePage.swf','99%','325');
? ? ? ? </script>
? ? </div>

其中?'<param name="wmode" value="Opaque">'

可以解决flash盖住asp.net的下拉菜单问题

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读