Hello, I need your help because I have a problem related to this code, at first I need to distinguish which Windows the person uses, and if he is 32 or 64. But I do not know what's wrong, I'm new to this area, could you help me?
Code:
<html>
<head>
<title>Teste</title>
<script type="text/javascript">
var OSName = "";
function sistema(){
if((window.navigator.userAgent.indexOf("Windows NT 10.0")!= -1)&&
(navigator.userAgent.indexOf('32')!= -1)){
OSName = "Windows 10 --> 32bits";}
else if(window.navigator.userAgent.indexOf("Windows NT 10.0")!=
-1)&&(navigator.userAgent.indexOf('64')!= -1){
OSName = "Windows 10 --> 64bits";}
alert(OSName);
}
</script>
</head>
<body onload="sistema()">
<input type="submit" name="Teste" value="Teste"
onclick="javascript:sistema();">
</body>
</html>