四虎精品视频-四虎精品成人免费网站-四虎黄色网-四虎国产视频-国产免费91-国产蜜臀97一区二区三区

檢測(cè)是否已安裝 .NET Framework 3.5的js腳本

本主題提供一個(gè)以 HTML/JavaScript 編寫的腳本,管理員可以使用該腳本來(lái)確定系統(tǒng)上是否存在 .NET Framework 3.5。
復(fù)制代碼 代碼如下:
<HTML>
<HEAD>
<TITLE>Test for the .NET Framework 3.5</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<SCRIPT LANGUAGE="JavaScript">
<!--
var dotNETRuntimeVersion = "3.5.0.0";

function window::onload()
{
if (HasRuntimeVersion(dotNETRuntimeVersion))
{
result.innerText =
"This machine has the correct version of the .NET Framework 3.5."
}
else
{
result.innerText =
"This machine does not have the correct version of the .NET Framework 3.5." +
" The required version is v" + dotNETRuntimeVersion + ".";
}
result.innerText += "/n/nThis machine's userAgent string is: " +
navigator.userAgent + ".";
}

//
// Retrieve the version from the user agent string and
// compare with the specified version.
//
function HasRuntimeVersion(versionToCheck)
{
var userAgentString =
navigator.userAgent.match(/.NET CLR [0-9.]+/g);
if (userAgentString != null)
{
var i;
for (i = 0; i < userAgentString.length; ++i)
{
if (CompareVersions(GetVersion(versionToCheck),
GetVersion(userAgentString[i])) <= 0)
return true;
}
}
return false;
}
//
// Extract the numeric part of the version string.
//
function GetVersion(versionString)
{
var numericString =
versionString.match(/([0-9]+)/.([0-9]+)/.([0-9]+)/i);
return numericString.slice(1);
}
//
// Compare the 2 version strings by converting them to numeric format.
//
function CompareVersions(version1, version2)
{
for (i = 0; i < version1.length; ++i)
{
var number1 = new Number(version1[i]);
var number2 = new Number(version2[i]);
if (number1 < number2)
return -1;
if (number1 > number2)
return 1;
}
return 0;
}

-->
</SCRIPT>
</HEAD>

<BODY>
<div id="result" />
</BODY>
</HTML>

如果搜索“.NET CLR”版本成功,將顯示以下類型的狀態(tài)消息:
This machine has the correct version of the .NET Framework 3.5.
This machine's userAgent string is: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 3.0.590; .NET CLR 3.5.20726; MS-RTC LM 8).
否則,顯示以下類型的狀態(tài)消息:
This machine does not have the correct version of the .NET Framework 3.5. The required version is v3.5.0.0.
This machine's userAgent string is: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 3.0.590; MS-RTC LM 8).

JavaScript技術(shù)檢測(cè)是否已安裝 .NET Framework 3.5的js腳本,轉(zhuǎn)載需保留來(lái)源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 极品美女在线视频| 大胆艺术| 日别视频| 10种齿痕图解| 欧美一级毛片免费视频| 天才不能承受之重| 杨贵妃黄色片| 忘忧草电影| 真实游戏电影无删减完整版| 宗利群| 李采潭全部作品百度| 女王的条件| 黄色网址视频免费| xiazai| 境界bleach千年血战| 内蒙古电视台节目表| 什么是实现碳达峰碳中和目标的基础路径 | xiazai| 熊出没十年之约| 拔萝卜电影| 林栋浦| 北京旅游自由行最佳攻略| 露底| 梁祝小提琴独奏曲谱完整版| 画皮2电影| 头像男头像| 艳丽娇娃| 改变自己吉他谱| 爱欲1990未删减版播放| 印度超人3| 浪客剑心星霜篇| 爱你电视剧演员表| 小学五年级研究报告| 尹雪喜电影| 周末的一天| 中国宇航员遇难| 电视剧《绿萝花》| 好好歌词| 抚养费标准一般是多少钱一个月| 电影善良的妻子| 格子论文|