选择Flash的方法
function getSWF(a) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[a];
} else {
if (window.navigator.userAgent.indexOf("Firefox") != -1) {
return document[a];
} else {
if (window.navigator.userAgent.indexOf("Chrome") != -1) {
return document[a];
} else {
if (window.navigator.userAgent.indexOf("Safari") != -1) {
return document.getElementById(a);
} else {
if (window.navigator.userAgent.indexOf("Opera") != -1) {
return document[a];
}
}
}
}
}
}
Flash选择方法详解
本文深入探讨了如何根据不同浏览器环境选择合适的Flash元素,包括IE、Firefox、Chrome、Safari和Opera等,提供了详细的JavaScript函数实现。
287

被折叠的 条评论
为什么被折叠?



