Internet Explorer and Edge browser must use Adobe Reader PDF reader to open PDF files, and other modern browsers bring their own PDF reader without installation.
Determine IE or edge if installed, browse PDF files, if not installed, give the installation software, let him download,
<! DOCTYPE html> $(function(){ functionIsacrobatplugininstall () {//The following code is the case of IE browser processing if(Window. ActiveXObject) | | (Navigator.userAgent.indexOf ("Trident") > 1)) { for(x = 2; x <) { Try{Oacro= eval ("New ActiveXObject (' Pdf.pdfctrl." + x + "');"); if(oacro) {return true; } } Catch(e) {}}Try{OAcro4=NewActiveXObject (' PDF.PDFCTRL.1 '); if(OAcro4)return true; } Catch(e) {}Try{OAcro7=NewActiveXObject (' Acropdf.pdf.1 '); if(OAcro7)return true; } Catch(e) {}}Else{ //Chrome and FF, Safrai and other browsers return true; } }; $('. AAA '). Bind (' click ',function(){ varpdfresult=Isacrobatplugininstall (); if(pdfresult) {//Jump after installationLocation = ' Jump to aaa.html '; }Else{//Skip to download install address not installedAlert ("Sorry, you have not installed the PDF Reader software yet, for the convenience of previewing PDF documents, select Install!") "); Location= ' Http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.3/chs/AdbeRdr930_zh_CN.exe '; } }); }) </script>JS to determine if IE and edge install Adobe Reader PDF reader