"JavaScript 플래시 설치 여부 확인"의 두 판 사이의 차이

32번째 줄: 32번째 줄:
*[[함수 is_ie]]
*[[함수 is_ie]]
*[[플래시]]
*[[플래시]]
==참고 자료==
*http://stackoverflow.com/questions/16801090/how-to-find-out-if-adobe-flash-player-is-installed-from-javascript


[[분류: JavaScript]]
[[분류: JavaScript]]

2015년 1월 29일 (목) 18:35 판

자바스크립트 플래시 설치 여부 확인
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 flase;
}
document.write( is_flash_installed() );
</script>

3 같이 보기

4 참고 자료

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