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

잔글 (로봇: 자동으로 텍스트 교체 (-http://zetawiki.com/js/ +http://zetawiki.com/ex/js/))
잔글 (봇: 자동으로 텍스트 교체 (-== 참고 자료 == +==참고==))
34번째 줄: 34번째 줄:
*[[플래시]]
*[[플래시]]


==참고 자료==
==참고==
*http://stackoverflow.com/questions/16801090/how-to-find-out-if-adobe-flash-player-is-installed-from-javascript
*http://stackoverflow.com/questions/16801090/how-to-find-out-if-adobe-flash-player-is-installed-from-javascript


[[분류: JavaScript]]
[[분류: JavaScript]]
[[분류: 플래시]]
[[분류: 플래시]]

2017년 6월 27일 (화) 10:27 판

자바스크립트 플래시 설치 여부 확인
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 }}