越简单越好!

检测客户端是否安装了Mediaplayer和MediaPlayer版本号

发表于 2007-04-24 16:21 | 1158次阅读 0次点赞   JavaScript
<IE:clientCaps    ID="oClientCaps"    style="{behavior:url(#default#clientcaps)}" />
<SCRIPT LANGUAGE="JavaScript">
<!--
function list(){
var mediaplayer = document.getElementById('mediaplayer');
var error = 0 ;
mediaplayer.onerror = function(){
   alert("您还未安装Media Player,请点击下面链接下载安装!");
}
if(error==0){
   WMPVersion=   oClientCaps.getComponentVersion("{22D6F312-B0F6-11D0-94AB-0080C74C7E95}", "ComponentID");    
   alert("您的Media Player版本是:"+WMPVersion);
}
}
//-->
</SCRIPT>
<body onload = "list();">
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="mediaplayer" style="display:none" ></object>
</body>
返回顶部 ^