开发者

How can I detect browser support of Flash in JavaScript? [duplicate]

开发者 https://www.devze.com 2023-04-04 23:46 出处:网络
This question already has answers here: Closed 11 years ago. This my HTML code but if the browser does not support Flash then I want to replace the image in the Flash part
This question already has answers here: Closed 11 years ago.

This my HTML code but if the browser does not support Flash then I want to replace the image in the Flash part

<!DOCTYPE html PUBLIC "-//开发者_StackOverflow社区W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script type="text/javascript">
      if (typeof navigator.plugins['Shockwave Flash'] !== 'undefined') {
        alert('support');
      } else {
        alert('not support');
      }
    </script>
  </head>

  <body>
  </body>
</html>


I would use one of the Flash Detection JavaScript libraries out there. This one works well.

0

精彩评论

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

关注公众号