CSDN博客

img wanghr100

取得ie详细版本信息.及其它版本信息的两种方法.

发表于2003/8/14 14:43:00  1367人阅读

第一种方法:

//通过读取注册表的信息的方法.
//HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/Version
//内有Internet Explorer的详细的版本号.
//你可以通过注册表读取众多的信息
//.缺点:有安全提示.

ie 的版本详细信息.

<script language="Javascript">
var oWshShell = new ActiveXObject("WScript.Shell");
var HKLM = "HKEY_LOCAL_MACHINE";
var ieVersion = oWshShell.RegRead(HKLM + "//Software//Microsoft//Internet
Explorer//Version");
document.write ("您的Internet Exploret版本是:"+ieVersion)
</script>


发散.....
MediaPlayer的版本详细信息

<script language="Javascript">
var oWshShell = new ActiveXObject("WScript.Shell");
var HKLM = "HKEY_LOCAL_MACHINE";
var MediaPlayerVersion = oWshShell.RegRead(HKLM + "//Software//Microsoft//MediaPlayer//PlayerUpgrade//PlayerVersion
");
document.write ("您的MediaPlayer版本是:"+MediaPlayerVersion)
</script>

Outlook Express的版本详细信息

<script language="Javascript">
var oWshShell = new ActiveXObject("WScript.Shell");
var HKLM = "HKEY_LOCAL_MACHINE";
var OutlookVersion = oWshShell.RegRead(HKLM + "//Software//Microsoft//Outlook Express//MediaVer");
document.write ("您的Outlook Express版本是:"+OutlookVersion)
</script>

.............................................


第二种方法:

//通过调用getComponentVersion方法.可以取得详细的组件版本.

<IE:clientCaps ID="oClientCaps" style="{behavior:url(#default#clientcaps)}" />
<SCRIPT>
    ieVersion = oClientCaps.getComponentVersion("{89820200-ECBD-11CF-8B85-00AA005B4383}",
    "ComponentID");
document.write ("您的Internet Exploret版本是:"+ieVersion)
</SCRIPT>
  

 

发散.....


//getComponentVersion Method
//语法 sVersion=oClientCaps.getComponentVersion(sID,sIDType)
//详细请见Microsoft Office Help DHTML, HTML & CSS.

附:
Component    Component ID
Address Book    {7790769C-0471-11D2-AF11-00C04FA35D02}
Windows Desktop Update NT   {89820200-ECBD-11CF-8B85-00AA005B4340}
DirectAnimation    {283807B5-2C60-11D0-A31D-00AA00B92C03}
DirectAnimation Java Classes  {4F216970-C90C-11D1-B5C7-0000F8051515}
DirectShow   {44BBA848-CC51-11CF-AAFA-00AA00B6015C}
Dynamic HTML Data Binding   {9381D8F2-0288-11D0-9501-00AA00B911A5}
Dynamic HTML Data Binding for Java  {4F216970-C90C-11D1-B5C7-0000F8051515}
Internet Connection Wizard  {5A8D6EE0-3E18-11D0-821E-444553540000}
Internet Explorer 5 Web Browser  {89820200-ECBD-11CF-8B85-00AA005B4383}
Internet Explorer Classes for Java  {08B0E5C0-4FCB-11CF-AAA5-00401C608555}
Internet Explorer Help   {45EA75A0-A269-11D1-B5BF-0000F8051515}
Internet Explorer Help Engine   {DE5AED00-A4BF-11D1-9948-00C04F98BBC9}
Windows Media Player   {22D6F312-B0F6-11D0-94AB-0080C74C7E95}
NetMeeting NT    {44BBA842-CC51-11CF-AAFA-00AA00B6015B}
Offline Browsing Pack   {3AF36230-A269-11D1-B5BF-0000F8051515}
Outlook Express    {44BBA840-CC51-11CF-AAFA-00AA00B6015C}
Task Scheduler    {CC2A9BA0-3BDD-11D0-821E-444553540000}
Microsoft virtual machine   {08B0E5C0-4FCB-11CF-AAA5-00401C608500}
VRML 2.0 Viewer    {90A7533D-88FE-11D0-9DBE-0000C0411FC3}
Wallet     {1CDEE860-E95B-11CF-B1B0-00AA00BBAD66}


参考 MSDN
       Web Workshop  |  DHTML, HTML & CSS

0 0

相关博文

我的热门文章

img
取 消
img