// Convert all links to visible URLs (good for printing // Find all links in the document var a = document.getElementsByTagName(“a”); while ( a.length ) { // Create a element var s = document.createElement(“strong”); // Make the contents equal to the link URL s.appendChild( document.createTextNode( a[i].href ) ); // Replace the original with the new element a[i].replaceChild( s, a[i] ); }