欢迎光临
我们一直在努力

介绍一个判断plug-ins/ActiveX 是否存在的例子

建站超值云服务器,限时71元/月

这里就以在ie3.02和netscape3+的浏览器为例,介绍关于flash(以flash2为例)插件是否安装.
<%  
    a = lcase(request.servervariables("http_user_agent"))
    if instr(a,"msie")>0 then
        if instr(a,"98")>0 or instr(a,"95")>0 or instr(a,"nt")>0 then
            ie32="true"
             ie 3 or greater on 32-bit
        end if
    elseif instr(a,"mozilla/3")>0 or instr(a,"mozilla/4")>0 then
        if instr(a,"opera")<=0 then
            nn="true"
             netscape 3 or greater
        end if
    end if

    if ie32 then
%>

    <script language="vbscript">
    if scriptenginemajorversion > 1 then
        on error resume next
        fin=(isobject(createobject("shockwaveflash.shockwaveflash")))
        if fin then
            msgbox "flash插件已安装!"
        else
            msgbox "flash插件没安装."
        end if
    end if
    </script>

<%
    elseif nn then
%>

    <script language="javascript">
    fin = navigator.plugins["shockwave flash 2.0"];
    if (fin)
    {
        alert("flash插件已安装!");
    }
    else
    {
        alert("flash插件没安装.");
    }
    </script>

<%
    end if
%>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 介绍一个判断plug-ins/ActiveX 是否存在的例子
分享到: 更多 (0)

相关推荐

  • 暂无文章