首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

js加载swf资料

2012-11-22 
js加载swf文件普通方式加载swf文件可以不引用swfobject.js!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0

js加载swf文件
普通方式加载swf文件可以不引用swfobject.js

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><title>SWFObject 2 static publishing example page</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><script type="text/javascript" src="swfobject.js"></script><script type="text/javascript">swfobject.registerObject("myId", "9.0.0", "expressInstall.swf");</script></head><body><div><object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="120"><param name="movie" value="test.swf" />        <!--[if !IE]>--><object type="application/x-shockwave-flash" data="test.swf" width="300" height="120"><!--<![endif]--><div><h1>Alternative content</h1><p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="js加载swf资料" /></a></p></div><!--[if !IE]>--></object><!--<![endif]--></object></div></body></html>


利用swfobject.js文件夹在swf
swfobject.js api地址:http://code.google.com/p/swfobject/wiki/api
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><title>SWFObject 2 dynamic publishing example page</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><script type="text/javascript" src="swfobject.js"></script><script type="text/javascript">swfobject.embedSWF("test.swf", "myContent", "300", "120", "9.0.0", "expressInstall.swf");</script></head><body><div id="myContent"><h1>Alternative content</h1><p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="js加载swf资料" /></a></p></div></body></html>

热点排行