判断客户端是否安装realplayer
<SCRIPT language="javascript" type="text/javascript">
var IsInstallRealPlayer;
var IsInstallMediaPlayer;
IsInstallRealPlayer=false;
IsInstallMediaPlayer=false;
</SCRIPT>
<SCRIPT type="text/vbscript">
On Error Resume Next
Set f=CreateObject("rmocx.RealPlayer G2 Control.1")
IF IsObject(f) Then
IsInstallRealPlayer=True
End If
Set f=CreateObject("MediaPlayer.MediaPlayer.1")
IF IsObject(f) Then
IsInstallMediaPlayer=True
End If
</SCRIPT>
<SCRIPT language="javascript" type="text/javascript">
if(IsInstallRealPlayer==false)
{
alert("没有装入RealPlayer");
window.location.href="http://cn.real.com";
}
if(IsInstallMediaPlayer==false)
{
alert("没有装入RealPlayer");
window.location.href="http://cn.real.com";
}
</SCRIPT>
var IsInstallRealPlayer;
var IsInstallMediaPlayer;
IsInstallRealPlayer=false;
IsInstallMediaPlayer=false;
</SCRIPT>
<SCRIPT type="text/vbscript">
On Error Resume Next
Set f=CreateObject("rmocx.RealPlayer G2 Control.1")
IF IsObject(f) Then
IsInstallRealPlayer=True
End If
Set f=CreateObject("MediaPlayer.MediaPlayer.1")
IF IsObject(f) Then
IsInstallMediaPlayer=True
End If
</SCRIPT>
<SCRIPT language="javascript" type="text/javascript">
if(IsInstallRealPlayer==false)
{
alert("没有装入RealPlayer");
window.location.href="http://cn.real.com";
}
if(IsInstallMediaPlayer==false)
{
alert("没有装入RealPlayer");
window.location.href="http://cn.real.com";
}
</SCRIPT>