Silverlight 2学习教程(八):检测客户端是否安装 Silverlight 插件

<script type="text/javascript">
function CheckSilverlightInstalled()
{
var isSilverlightInstalled = false;
try{
try{
var slControl = new ActiveXObject('AgControl.AgControl');//检查IE
isSilverlightInstalled = true;
}
catch(e){
if(navigator.plugins["Silverlight Plug-In"]) //检查非IE
{
isSilverlightInstalled = true;
}
}
}
catch(e){}
return isSilverlightInstalled;
}
alert("是否安装了 Silverlight 插件?" + CheckSilverlightInstalled())
</script>
阅读更多

没有更多推荐了,返回首页