Home
 
 
Search:  
C C++ Perl PHP Python HTML ShellScripts
 
 
  Coding Books
  Tutorials
  Search Code
  Browse Code
  Link to Us
  Site News
  Contact Metalshell
 
 
 
  Submit Code   Statistics
 



Web Design in a Nutshell    (ISBN: 0596001967)


 

 List Price: $29.95
 Our Price: $20.97
 Used Price: $5.95

 Release Date: 15 October, 2001
 Manufacturer: O'Reilly & Associates (Paperback)
 Sales Rank: 2,444

 Author: Jennifer Niederst









More Info

 Javascript Array's 2003-03-16 12:21:52
  html 
Category: source:html:javascript
Description: Simple array example.
Platform: all
Author: mind
Viewed: 6252
Rating: 2.4/5 (24 votes)
If you have any questions about this piece of code or still need help, try posting your question on the forum.

 

Printable Version
array.js
<!-- array.js - mind (mind@metalshell.com) -->

<!-- pretty simple array example -->
<!-- $ If you have any problems or questions, email me $ -->
<!-- http://www.metalshell.com -->

<!-- put this code into the <head> section of your html document. -->

<!-- start our javascript -->
<script language=JavaScript>
// define our array exmp
var exmp = new Array("This", "Is", "Our", "Array");
var i;

// create a function
function showArray()
{
  for (i = 0; i < exmp.length; i++)
    // write out each segment of the array with each loop
    document.write('<font>' + exmp[i] + '</font><br>');
}

// end of our javascript
</script>
<!-- place this code anywhere on your html document (example) -->

<!-- align our link below -->
<div align=center>
        <!-- make a link that points to our js function printText() -->
        <a href="javascript: showArray();">Click Here!</a>
</div>
Rate this code:
(Not Helpful)  (Very Helpful) 

 
 
   Developer.*  
   Blue Parrots  
   Technipal  
   Defy Magazine  
   Code Project  
   Prog. Heaven  


Got Money?