开发者

how to detect flash using SWFObject

开发者 https://www.devze.com 2023-02-26 17:05 出处:网络
I have downloaded SWFObject, and included it in my website. Now I want to simply get a true or false value based on whethe开发者_如何学Gor or not Flash is installed in the users browser when they visi

I have downloaded SWFObject, and included it in my website. Now I want to simply get a true or false value based on whethe开发者_如何学Gor or not Flash is installed in the users browser when they visit my site.

How can I do this?


if (swfobject.hasFlashPlayerVersion("9.0.18")) {
  // has Flash
}
else {
  // no Flash
}

or replace "9.0.18" with the minimum version you require


If You use jQuery SWFObject you could use:

if (!$.flash.hasVersion('9')) {
 //has Flash
}
else {
 //no_flash
}
0

精彩评论

暂无评论...
验证码 换一张
取 消