adding an image into a hyperlink does not show the image in javascript
<p>I have this javascript code:</p>

<pre><code>var img = document.createElement("img");

img.setAttribute('src', 'close.png');
img.setAttribute('alt', 'cancel this file');
img.setAttribute('title', 'cancel this file');

var link = document.createElement('a');
link.setAttribute('href', '#');

link.appendChild(img);
</code></pre>

<p>But the result does not show the image? </p>

<p>Did I do anything wrong?</p>

<p>Thanks in advance.</p>
