如何检测客户端浏览器是否安装了adobe reader插件

如果安装了adobe reader插件的客户端浏览器,我如何检查php或js?     
已邀请:
放手一搏: http://thecodeabode.blogspot.com/2011/01/detect-adobe-reader-plugin.html     
您可以通过navigator.plugins检测它。     
这对我有用。
function isAcrobatReaderInstalled() {
                    var isInstalled = false;
                    if (window.ActiveXObject) {
                        var control = null;
                        try {
                            // AcroPDF.PDF is used by version 7 and later
                            control = new ActiveXObject('AcroPDF.PDF');
                        } catch (e) { }
                        if (!control) {
                            try {
                                // PDF.PdfCtrl is used by version 6 and earlier
                                control = new ActiveXObject('PDF.PdfCtrl');
                            } catch (e) { }
                        }
                        if (control)
                            isInstalled = true;
                    } else {
                        // Check navigator.plugins for "Adobe Acrobat" or "Adobe PDF Plug-in"*
    for (var i = 0; i<navigator.plugins.length; i++) 
            {   
                  var n = navigator.plugins[i].name;                              
                    if (n.indexOf('Adobe Acrobat') > -1 || n.indexOf('Adobe PDF') > -1)
                    {
                            isInstalled = true; 
                            break;
                    }
            }
                    }   
                    return isInstalled;
                }
    
Mac OS X根本不需要Adobe Reader,Safari会直接在浏览器窗口中显示它们。 不要强制Adobe Reader,也不要强制下载文件而不是仅显示文件。     

要回复问题请先登录注册