I went to the user's site in the afternoon and felt that this problem was indeed strange. Finally, I found that the computer that was in trouble was the operating system of WIN 2000. I felt that the crux of the problem might be here. I went online and found that Media Player 11 does not support Win2000 system. I need to judge the user's version of the operating system and let Win2000 users download Media Player 9.
Okay, the cause of the problem has been found, and solving the problem is a very simple thing.
The following mainly talks about how to use JavaScript to determine the user's operating system and version.
Key parts:
: User browser, operating system and other information, corresponding to the User-Agent part of the HTML request file header.
Code section:
<script language="javascript">
var ua = ;
var osVersion = (";")[2];
var osV = (-3,3);
switch(osV)
{
case "5.0":
("Win2000");
break;
case "5.1":
("WinXP");
break;
case "5.2":
("Win2003");
break;
default:
("Others");
break;
}
</script>
Remark:
Several values:
1)WinXP+IE7:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; CIBA; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
2)WinXP+FF3.0:Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)
3)Win2000+IE6:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
4)Win2000+FF3.1:Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-CN; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2
The above values are for reference only, so as to understand the code. Please test the specific values in detail. It is better to have no books than to believe in books. It is better to believe what others say than to believe what you do yourself. Haha
Okay, the cause of the problem has been found, and solving the problem is a very simple thing.
The following mainly talks about how to use JavaScript to determine the user's operating system and version.
Key parts:
: User browser, operating system and other information, corresponding to the User-Agent part of the HTML request file header.
Code section:
<script language="javascript">
var ua = ;
var osVersion = (";")[2];
var osV = (-3,3);
switch(osV)
{
case "5.0":
("Win2000");
break;
case "5.1":
("WinXP");
break;
case "5.2":
("Win2003");
break;
default:
("Others");
break;
}
</script>
Remark:
Several values:
1)WinXP+IE7:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; CIBA; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
2)WinXP+FF3.0:Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)
3)Win2000+IE6:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
4)Win2000+FF3.1:Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-CN; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2
The above values are for reference only, so as to understand the code. Please test the specific values in detail. It is better to have no books than to believe in books. It is better to believe what others say than to believe what you do yourself. Haha