'cpuClass' Example : cpuClass « Javascript Properties « JavaScript Reference

JavaScript Reference
1.Event Handlers Reference
2.Javascript Collections
3.Javascript Methods
4.Javascript Objects
5.Javascript Properties
JavaScript Reference » Javascript Properties » cpuClass 
'cpuClass' Example

<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)

<input type="button" value="Click here" onClick="function1();">

Related examples in the same category
1.'cpuClass' Syntax and Note
2.'cpuClass' Possible Values
3.'cpuClass' is applied to
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.