Mega Code Archive

 
Categories / JavaScript DHTML / Development
 

Displaying the Navigators Associative Array

<HTML> <HEAD> <TITLE>Associative object arrays</TITLE> <SCRIPT>  function showProperties (theObject){     for (i in theObject) {        if (theObject[i] != null) {            document.write(i + " : " + theObject[i] + "<br>");        } else {           document.write(i + "<br>");        }     }     return;  }  </SCRIPT> </HEAD> <BODY> <SCRIPT>  showProperties(window.navigator);  // showProperties(window.document);  </SCRIPT> </HTML>