开发者

detect if flash is installed without js

开发者 https://www.devze.com 2023-03-20 02:26 出处:网络
If flash is not installed, i want to replace the flash animation with a jq开发者_如何学JAVAuery animation.

If flash is not installed, i want to replace the flash animation with a jq开发者_如何学JAVAuery animation. BUT if flash and js are not installed, i want to display a div with a message to the user. how is it possible to check if flash is not running at the clientside without using js?

kind regards,


Use a javascript event to replace your message with the Flash animation. If Javascript is not running, you will see the message instead.

SWFObject is a great little tool for completing exactly what you want.


Add to HTML body classes: "no_flash no_js". They will be your default when js & flash not available.

Then when you have js, with it's help remove no_js class. With help of js try to determine flash and if it's present, show flash else -- js animation.


Do it the other way around:

  1. Display a div with a message
  2. If JavaScript is on, replace the div with either:

    a) a Flash animation, if Flash is installed or

    b) a jQuery based animation

0

精彩评论

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