반응형
크롬은 자체 pdf리더 지원
익스에서 체크할일 생김ㅋ
function fnFoundPdf(){
var found = false;
var info = '';
try{
acrobat4 = new ActiveXObject('PDF.PdfCtrl.1');
if (acrobat4){
found = true;
info = 'v. 4.0';
}
} catch (e){
//???
}
if (!found){
try{
acrobat7 = new ActiveXObject('AcroPDF.PDF.1');
if (acrobat7){
found = true;
info = 'v. 7+';
}
} catch (e) {
//???
}
if (!found && navigator.plugins && navigator.plugins.length>0){
for (var i = 0; i -1){
found = true;
info = navigator.plugins[i].description + ' (' + navigator.plugins[i].filename + ')';
break;
}
}
}
}
return found;
}
if(isIE()){
if(!fnFoundPdf()){
alert("PDF리더 프로그램을 설치해주세요.")
document.downFrame.location.href = '/파일다운.asp?filepath=down/&filename=readerdc_kr_xa_install.exe';
return;
}
}
반응형
'프로그래밍 > JavaScipt' 카테고리의 다른 글
| javascript daum 주소검색 api https (0) | 2017.06.27 |
|---|---|
| javascript iOS 10 모바일웹 pinch-to-zoom issue (user-scalable) (0) | 2017.03.23 |
| javascript input number type maxlength 설정 (0) | 2016.12.22 |
| javascript youtube script js (0) | 2016.08.11 |
| javascript 날짜비교/일수 차이 계산 (0) | 2016.07.25 |