how to use javascript to add link to image element created using javascript
<p>how to add link for the image created using following javascript.</p>

<p>thanks for any  help or replies.</p>

<pre><code>for(var i=0; i&lt;images.length; i++) {
   var t = document.createElement('IMG');
   t.setAttribute('src',images[i]);
   t.setAttribute('border', 0);
   t.setAttribute('width',imageWidth);
   t.setAttribute('height',imageHeight);
   t.style.position = 'absolute';
   t.style.visibility = 'hidden';

   el.appendChild(t);
}
</code></pre>
