设为首页
加入收藏
联系我们
ASP技术 PHP技术 CGI技术 JSP技术 .NET技术 建站技术 VB技术 C++技术 DELPHI技术 编程相关技术
 源码中国-技术中心 >> ASP技术 >> 客户端相关 >> 介绍一个判断plug-ins/ActiveX 是否存在的例子
字号:【 】 
介绍一个判断plug-ins/ActiveX 是否存在的例子
http://edu.cn700.com (点击数: 时间:2005-4-27)


这里就以在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
%>

 上一篇文章:在网页中调用本地的应用程序
 下一篇文章:一个查看ASP的JavaScript程序,方便大家学习ASP程序(JS)
姓 名:  1分 2分 3分 4分 5分
进入论坛 | 发表评论 | 查看评论 | 打印此文 | 关闭窗口 
 
 ▍最新文章
关于我们 | 版权声明 | 广告服务 | 帮助中心 | 联系我们 | 网站地图 | 发布源码 | 设为首页 |