Get an object of flash or embed in browser(IE and Firefox/Opera/Safari/Chrome)

1. Place a flash into the html page.
<object id="mySwf" data="" type="application/x-shockwave-flash">
    <embed src="" name="mySwf" type="application/x-shockwave-flash"/>
</object>

2. By the following function get an object in IE, get an embed in Firefox/Opera/Safari/Chrome.
function thisMovie(svgName) {
   if (navigator.appName.indexOf("Microsoft") != -1) { return window[svgName]; }
   else { return document[svgName]; }
}
 or
   
function getFlashObj(name){ 
         return document[name] || window[name]; 
    }

ref:
http:// w 3help. org/zh-cn/causes/RX8012
http:// s nandy. iteye.com/blog/684672

评论

此博客中的热门博文

XML, XSL, HTML

Input in element.eleme.io

Data URI是由RFC 2397 ACE