RSS
热门关键字:  性福人生  生化危机  虚拟人生  o ice  秘密潜入1

如何调用Flash才符合Web网页标准?

来源: 作者: 时间:2008-04-14 Tag: 点击:

 

function swf(file,w,h) {
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="" width="'+w+'" height="'+h+'"> ');
    document.write('<param name="movie" value="' + file + '">');
    document.write('<param name="quality" value="high"> ');
    document.write('<param name="wmode" value="transparent"> ');
    document.write('<param name="menu" value="false"> ');

" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed> ');
    document.write('</object> ');
}

<div id="flash">
    <script type="text/javascript" language="javascript">swf('designyesky.swf','500','220');</script>
</div>

  建立id为flash的div作为一容器,在其内部嵌入js脚本,变量依次为:文件路径、宽度、高度。

">
<html xmlns="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>符合web标准的嵌入Flash的方法</title>
<script type="text/javascript" language="javascript" src="flash.js"></script>
<style type="text/css">
#flash { width:500px; margin:50px auto; border:5px solid #03c;}
</style>
</head>
<body>
<div id="flash">
    <script type="text/javascript" language="javascript">swf(designyesky.swf','500','220');</script>
</div>
</body>
</html> 

最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册