javascript: Avoid browser scrolling back to top on content insertion
<p>I thought this would be very easy to solve, but I can`t seem to find a solution anywhere.
It's a very annoying javascript 'feature?'. Every time I add content to a div the document gets scrolled back to top. How can I avoid this annoying behaviour?</p>

<pre><code>n = 0;
function addContent() {
    div = document.getElementById('content');
    for(var i = 0; i &lt; 100; i++) {
        n++;
        div.innerHTML = div.innerHTML + n + '&lt;br /&gt;';
    }
}

&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;div id="content"&gt;&lt;/div&gt;
&lt;a href="#" onclick="addContent()"&gt;more content&lt;/a&gt;
</code></pre>

<p>Ex: <a href="http://jsfiddle.net/hQP2q/" rel="nofollow">http://jsfiddle.net/hQP2q/</a></p>
