JavaScript 플래시 설치 여부 확인

Jmnote bot (토론 | 기여)님의 2020년 11월 2일 (월) 02:51 판 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
자바스크립트 플래시 설치 여부 확인
is_flash_installed

1 예시 1[ | ]

<script>
var is_flash_installed = false;
try {
  if(new ActiveXObject('ShockwaveFlash.ShockwaveFlash')) is_flash_installed=true;
}catch(e){
  if(navigator.mimeTypes['application/x-shockwave-flash'] != undefined) is_flash_installed=true;
}
document.write( is_flash_installed );
</script>

2 예시 2[ | ]

<script>
function is_flash_installed() {
	try { if(new ActiveXObject('ShockwaveFlash.ShockwaveFlash')) return true; }
	catch(e){ if(navigator.mimeTypes['application/x-shockwave-flash'] != undefined) return true; } 
	return false;
}
document.write( is_flash_installed() );
</script>

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}