去掉FLASH激活提示(双击才能打开超链接)

去掉FLASH激活提示(双击才能打开超链接)

微软官方关于激活控件的文章:http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/activating_activex.asp

解决方法:
把HTML页面中显示FLASH控件的代码写到JS中动态显示,如: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="767" height="122">
    <param name="movie" value="http://www.dkonline.com.cn/images/menu.swf">
    <param name="WMode" value="Transparent">
    <param name="quality" value="high">
    <embed src="http://www.dkonline.com.cn/images/menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="767" height="122"></embed>
</object>
示例页面:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<script language="javascript" src="ss.js"></script>
<script language="javascript">
ShowMenu();
</script>
</body>
</html>ss.js文件:
function ShowMenu()
{
document.write(''
    +'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="767" height="122">'
    +'    <param name="movie" value="http://www.dkonline.com.cn/images/menu.swf">'
    +'    <param name="WMode" value="Transparent">'
    +'    <param name="quality" value="high">'
    +'    <embed src="http://www.dkonline.com.cn/images/menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="767" height="122"></embed>'
    +'</object>'
);
}

也可以使用SWFObject来输出FLASH http://blog.deconcept.com/swfobject/



        本Blog纯属个人学习、工作需要,记录相关资料。请不要发表任何有人身攻击的言论,谢谢! www.zhipsoft.cn

你可能感兴趣的:(去掉FLASH激活提示(双击才能打开超链接))