Full version: jsB@nk » Link » Listing Array Links
URL: https://www.javascriptbank.com/listing-array-links.html
Sometimes you want to create list of links without writting all HTML? Let use this link script, just enter your URLs in a string array, the code will make the rest for you, the code will make array convert and your array values will be formatted and placed as links. You can sort array before processing.
Full version: jsB@nk » Link » Listing Array Links
URL: https://www.javascriptbank.com/listing-array-links.html
<script type="text/javascript">// Created by: Lee Underwood :: http://javascript.internet.com/function linkDisplay() { /* Enter the link name below. Each entry must have a unique number in the "[]" brackets. */ var links = new Array(); links[0]="Google"; links[1]="Yahoo"; links[2]="Web Reference"; links[3]="JavaScript Bank"; /* Enter the link URL below. Each entry must have a unique number in the "[]" brackets which matches the entry above. */ var linkURL = new Array(); linkURL[0]="http://www.google.com"; linkURL[1]="http://www.yahoo.com"; linkURL[2]="http://www.webreference.com"; linkURL[3]="http://www.javaScriptbank.com"; for (i=0; i<links.length; i++) { document.write("<li>"+links[i].link(linkURL[i])+"</li>"); }}linkDisplay();</script>