• [javascript] 用js来调入flash文件


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>用js来调用flash</title>
    <script type="text/javascript">
    function flashad(url,w,h,id){
    	document.write("<object id='"+id+"' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,24,0' width='"+w+"' height='"+h+"'><param name='movie' value='"+url+"'><param name='wmode' value='transparent'><param name='allowScriptAccess' value='always'><param name='allowFullScreen' value='false' /><param name='quality' value='high'><param name='menu' value='false'><embed width='"+w+"' height='"+h+"' src='"+url+"' name='"+id+"' allowScriptAccess='always' allowFullScreen='false' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' type='application/x-shockwave-flash'></embed></object>");
    }
    /*
    	参数:url:flash的swf文件地址,可以是绝对路径也可以是相对路径;
    	w:flash宽度;
    	h:flash高度;
    	id:flash的id
    */
    </script>
    </head>
    <body>
    <!--引入flash-->
    <SCRIPT>flashad("http://img1.126.net/channel5/007544/110300_100525.swf",160,140,"myflash")</SCRIPT>
    </body>
    </html>
    
  • 相关阅读:
    shell函数
    sed命令
    交互式输入与for语句
    day01_云计算概述及kvm介绍
    grep与正则表达式
    shell的编程原理
    shell的文本处理工具
    shell的基础入门
    深入理解JavaScript中 fn() 和 return fn() 的区别
    一篇笔记带你快速掌握面向对象的Javascript(纯手打)
  • 原文地址:https://www.cnblogs.com/fengfan/p/1765453.html
Copyright © 2020-2023  润新知