Example: Generate Footnotes from Links

If you look at the code of this page, you'll notice that the only content on the page are these paragraphs of text. The section "References" at the bottom has been generated using JavaScript and the DOM. You can view or download the script as a text file. If this is placed in an external JavaScript file, it makes the page extremely light. Displayed in this sentence is another example link to demonstrate how effective this script is in taking advantage of the code's inherent semantic value.

The code generates a SUP element which contains a Link that references an Anchor below. For the bottom part of the page, it generates a DIV, assigns it an ID and populates it with a Header and an Ordered List. The List Items are populated with an Anchor, a Paragraph and a Link Element. All of these elements can be styled through CSS.

The script is an adaptation from an earlier script designed to Print HREFs from Links. Using a bit more of the DOM to create elements, it was fairly easy to amend the script to produce these results. This script is a product from Drunk Monkey and is available for use under the Creative Commons License. Any comments or suggestions would be really welcome and can be sent to me at

Cheers!   :o)