'cpuClass' Example : cpuClass : Javascript Properties : JavaScript Reference examples (example source code) Organized by topic

JavaScript Reference
C++
JavaScript Reference Home »  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>

    
      
      
Related examples in the same category
1.  'cpuClass' Syntax and Note
2.  'cpuClass' Possible Values
3.  'cpuClass' is applied to








Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.