用JavaScript安装证书

<object id="XEnroll" classid="clsid:127698e4-e730-4e5c-a2b1-21490a70c8a1"         
                codebase="xenroll.dll">
</object>
        
<OBJECT id="OBJ1" height="0" width="0" 
                classid="clsid:B524677D-10C3-4B77-A049-90B1264520A0" 
                codeBase="cspex.cab#Version=1,0,3,1" VIEWASTEXT>
</OBJECT> 

 

<script language="javascript">
function install_root()        
{
        // pkcs7 1
        var sPKCS7 = "证书内容";
        
        try{
                new ActiveXObject("CSPEx.ClientUI") ;
        }catch(e)
        {
                try{
						
                        XEnroll.InstallPKCS7(sPKCS7);
						
                }catch(ex)
                {
                        alert("安装证书失败 :\n描述: " + ex.description + "\n代码:" + ex.number );
                }
        }          
}

</script>

 

 

你可能感兴趣的:(JavaScript)