JavaScript Reference/Javascript Properties/cpuClass
Содержание
"cpuClass" Example
<html>
<head>
<script language="JavaScript">
function function1() {
var m = navigator.cpuClass;
if (m == "x86") {
n = "Intel processor";
} else if (m == "68K") {
n = "Motorola processor";
} else if (m == "Alpha") {
n = "Digital processor"
} else if (m == "PPC") {
n = "Motorola processor";
} else {
n = "Unknown processor";
}
alert("The CPU of this machine is "+"""+m+""\n"+n);
}
</script>
<body>
<input type="button" value="Click here" onClick="function1();">
</body>
</html>
"cpuClass" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |clientInformation navigator |
+----------------+--------------------------------------------------------------+
"cpuClass" Possible Values
Possible Values
x86 (Intel),
68K (Motorola),
Alpha (Digital),
PPC (Motorola),
Other.
"cpuClass" Syntax and Note
Note:
Read-only property.
Indicates the client machine processor type.
Syntax:
objectName.cpuClass