Created
February 15, 2012 15:00
-
-
Save ChrisMoney/695433c6b1ee4e6ce8bc to your computer and use it in GitHub Desktop.
Javascript --2 Dimensional Array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Two Dimensional Array | |
<html> | |
<body> | |
<SCRIPT TYPE ="text/javascript"> | |
var personnel = new Array(); | |
personnel[0] = new Array(); | |
personnel[0] [0] = "Name0"; | |
personnel [0] [1] = "Age0"; | |
personnel [0] [2] = "Address0"; | |
personnel [1] = new Array(); | |
personnel [1] [0] = "Name1"; | |
personnel [1] [1] = "Age1"; | |
personnel [1] [2] = "Address1"; | |
personnel [2] = new Array(); | |
personnel [2] [0] = "Name2"; | |
personnel [2] [1] = "Age2"; | |
personnel [2] [2] = "Address2"; | |
document.write ("Name:" + personnel1 [1] [0] + "<BR>"); | |
document.write "Age:" + personnel1 [1] [1] + "<BR>"); | |
document.write "Address:" + personnel1 [1] [2] + "<BR>"); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment