检测浏览器是否支持有Flash2.0以上或有Flash插件

发表于:2007-06-30来源:作者:点击数: 标签:
html head % Set obJS = Server.CreateObject(MSWC.BrowserType) If obJS. java script = TRUE Then ‘’Look for a version of Internet Explorer that supports ActiveX (i.e., one that‘’s ‘’running on a platform other than Mac or Windows 3.1) or
<html>
<head>
<%
Set obJS = Server.CreateObject("MSWC.BrowserType")
If obJS.javascript = TRUE Then
‘’Look for a version of Internet Explorer that supports ActiveX (i.e., one that‘’s
‘’running on a platform other than Mac or Windows 3.1) or a browser that supports
‘’the plugin property of the navigator object and that has Flash Player 2.0
‘’installed:
%>
<script language="JavaScript">
<!--
if ((navigator.appName == "Microsoft Internet Explorer" &&
navigator.appVersion.indexOf("Mac") == -1 &&
navigator.appVersion.indexOf("3.1") == -1) ||
(navigator.plugins && navigator.plugins["Shockwave Flash"])
|| navigator.plugins["Shockwave Flash 2.0"]) {
window.location=‘’flashed.htm‘’;}
else {
window.location=‘’nonflashed.htm‘’;}
// -->
</script>
<%
obJS.Close
Set obJS = Nothing
End If
%>
</head>
<body>
<a href="flashed.htm">See the Flashed Site</a><br>
requires: <a href="http://www.macromedia.com/shockwave/download/index.cgi?
P1_Prod_Version=ShockwaveFlash">Flash Player</a>
<br>
<a href="nonflashed.htm">See the unFlashed Site</a>
</body>
</html>

原文转自:http://www.ltesting.net