2011-09-14 10 views
2

이 내 HTML 코드는하지만 나는 거기 플래시 감지 자바 스크립트 라이브러리 중 하나를 사용하는 것이 플래시 부분에JavaScript에서 Flash의 브라우저 지원을 어떻게 감지합니까? 브라우저가 플래시를 지원하지 않는 경우

<!DOCTYPE html PUBLIC "-//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> 
+1

다음 사이트를 참조하십시오. http://stackoverflow.com/q/159261/508702 –

답변

6

을 이미지를 교체합니다. This one이 잘 작동합니다.

관련 문제