关于Flash提示“单击击活并使用此控件”的解决方案
2007-04-05 11:24
501 查看
网站上的Flash都提示“单击击活并使用此控件”,只有点击一次Flash后,才能单击该Flash。
解决方法:
1:页面结构是一个Div(div1)里面包含两个Div(div2,div3)和一个Table,
其中div2里主要是放一张空图片,指定图片的宽和高为要显示的Flash的宽和高
其中div3的内容为空(页面加载的时候动态的加载Flash)
其中table是一些附加作用,如隐藏Flash
2:设置div1和div的样式
3:动态加载Flash
下面是完整代码:
<SCRIPT LANGUAGE='JavaScript'>
function closeDL(dlid1,dlid2) {
document.getElementById(dlid1).style.visibility='hidden';
if (dlid2)
{
document.getElementById(dlid2).style.visibility='hidden';
}
}
function insertFlash(elm, url, w, h, id) {
if (!document.getElementById(elm)) return;
var str = '';
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" id='+id+'></embed>';
document.getElementById(elm).innerHTML = str;
}
</script>
<div id=flashdllayer346130a0478588 style='position: absolute;visibility:visible;z-index:1;top:5px;right:2px;'>
<div style='position:absolute; z-index:2; width:100px;height:280px;top:0px;right:0px;'> <a href="http://localhost/index.htm" target="_blank"><img src="http://localhost/blank.gif" width="100" height="280" border="0"></a></div>
<div id="flashdllayer346130a0478588_swf"></div>
<table width="100" bgcolor="#CCCCCC" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right" style="padding-top:2px;padding-right:3px;"><a href="javascript:closeDL('flashdllayer346130a0478588','flashdllayer246130a0478588');" style="font-size:12px;color:#000000;text-decoration:none;" target="_self">关闭</a></td>
</tr>
</table>
</div>
<script type="text/javascript">
insertFlash("flashdllayer246130a0478588_swf", "http://localhost/dl.swf","100", "280", "dl");
</script>
</div>
结束
解决方法:
1:页面结构是一个Div(div1)里面包含两个Div(div2,div3)和一个Table,
其中div2里主要是放一张空图片,指定图片的宽和高为要显示的Flash的宽和高
其中div3的内容为空(页面加载的时候动态的加载Flash)
其中table是一些附加作用,如隐藏Flash
2:设置div1和div的样式
3:动态加载Flash
下面是完整代码:
<SCRIPT LANGUAGE='JavaScript'>
function closeDL(dlid1,dlid2) {
document.getElementById(dlid1).style.visibility='hidden';
if (dlid2)
{
document.getElementById(dlid2).style.visibility='hidden';
}
}
function insertFlash(elm, url, w, h, id) {
if (!document.getElementById(elm)) return;
var str = '';
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" id='+id+'></embed>';
document.getElementById(elm).innerHTML = str;
}
</script>
<div id=flashdllayer346130a0478588 style='position: absolute;visibility:visible;z-index:1;top:5px;right:2px;'>
<div style='position:absolute; z-index:2; width:100px;height:280px;top:0px;right:0px;'> <a href="http://localhost/index.htm" target="_blank"><img src="http://localhost/blank.gif" width="100" height="280" border="0"></a></div>
<div id="flashdllayer346130a0478588_swf"></div>
<table width="100" bgcolor="#CCCCCC" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right" style="padding-top:2px;padding-right:3px;"><a href="javascript:closeDL('flashdllayer346130a0478588','flashdllayer246130a0478588');" style="font-size:12px;color:#000000;text-decoration:none;" target="_self">关闭</a></td>
</tr>
</table>
</div>
<script type="text/javascript">
insertFlash("flashdllayer246130a0478588_swf", "http://localhost/dl.swf","100", "280", "dl");
</script>
</div>
结束
相关文章推荐
- 关于使用日期控件和change事件的冲突解决方案
- 解决IE7中flash“单击以激活并使用此控件”的办法(解决flash)
- 解决Flash“单击以激活并使用此控件”问题
- 解决“单击以激活并使用此控件”的办法(解决flash)<转>
- 解决“单击以激活并使用此控件”的办法(解决flash)
- Solution:使用Shockwave Flash Object控件的时候提示:未能导入 Activex控件,请确保它已正确注册!
- 使用微软的Ajax控件遇到的后台js提示语句不起作用的解决方案其一
- 关于ActiveReport使用ActivexViewer输出时,客户端不会提示下载控件的问题.
- 使用vs2008创建.net2.0时网站时,使用Ajax控件会提示:Microsoft JScript 运行时错误: 'Sys' 未定义解决方案
- Flash中“单击以激活并使用此控件”
- 解决Delphi中使用TWebBrowser控件访问带Flash网页时提示报错的问题
- 解决网页中Flash“单击以激活并使用此控件”的办法
- 网页中Flash出现“单击激活并使用此控件”的解决方法
- 去掉IE上的" 单击以激活和使用此控件 "提示
- NET控件关于Popup Win控件的使用介绍(消息提示控件)[转]
- 解决Flash“单击以激活并使用此控件”问题
- [VB.NET]在VB2005中使用flash控件提示我要注册,咋办?
- “单击以激活并使用此控件”的解决方案
- 关于使用<ajax:CascadingDropDown>控件出现的500错误和ScriptManager出现的注册表冲突错误解决方案
- 解决“单击以激活并使用此控件”的办法(解决flash)(代码全部贴出)