js判断机子是否安装pdf插件

 
<SCRIPT LANGUAGE="Javascript">

// detection for Netscape
var useAcrobat = navigator.mimeTypes &&
navigator.mimeTypes["application/pdf"]

</SCRIPT>

<SCRIPT LANGUAGE="VBScript">

on error resume next
   useAcrobat = not IsNull(CreateObject("AcroExch.Document"))
   '                can be CreateObject("PDF.PdfCtrl.1") too!


</SCRIPT>

<SCRIPT>

   if (useAcrobat)
      document.write("PDF 已安装");
   else
      document.write("未安装PDF");

</SCRIPT>

你可能感兴趣的:(pdf)