2014-09-23 58 views
-2

已經alredy對Adobe的代碼檢測到我,但 我需要知道的Adobe Acrobat至極版本有我的瀏覽器如何知道什麼版本的Adobe Acrobat具有我的瀏覽器?

<script> 
    var p; // variable local para detectar el acrobat 
    var compatibleadobeacrobat=false; // variable booleana del detector acrobat 
    try { 
    p = new ActiveXObject('AcroExch.Document'); 
    } 
    catch (e) { 


    // active x object could not be created 
    document.write('<img src="imagenes/iconos_VX_s2.png" width="26" height="20">'); 
    compatibleadobeacrobat=false; 
    document.write("<br>compatible: "+compatibleadobeacrobat); 
    } 
    if (p){ 
    document.write('<img src="imagenes/iconos_VX_s1.png" width="26" height="20">'); 
    compatibleadobeacrobat=true; 
    document.write("<br>compatible: "+compatibleadobeacrobat); 
    } 
    </script> 

回答

0

有關如何使用navigator的財產plugins得到plugins數組後發現Adobe Reader,請免費獲贈版本從version屬性?

我不知道如何調用Adobe Reader加載項,所以此代碼未經測試,但應該可以工作。

var pl = navigator.plugins; 

if(pl) 
{ 
    var where = 0; 
    for(var i=0;i<pl.length;i++) 
    { 
    var name = pl[i].name; 
    if(name.search('Adobe PDF Reader')!=-1) 
    { 
     where = i; 
    } 
    if(where) 
     break; 
    } 
    var ver = pl[where].version; 
} 
+0

感謝庫巴的,如果我寫 如果(name.search( '安裝Adobe Acrobat')!= - 1) 及其作品 – Noel 2014-09-23 17:09:27

+0

很高興我能幫助:) – 2014-09-23 21:16:14

相關問題