Simple javascript prototype issue
<p>I am trying to attach an onclick function to every a tag.</p>

<p>I have</p>

<pre><code>task.prototype.init=function(){  
        for (value in obj){
            var Link=document.createElement('a');
                Link.innerHTML='click';
                Link.id=value;   //I want to get the value
                Link.href='#'
                Link.onclick=this.changeName;
                document.body.appendChild(Link);
         }
}

task.prototype.changeName=function(){  

        //I want to get the clicked element id and I am not sure how to do it. 

    return false;
    }
</code></pre>

<p>Is there anyway to accomplish this?</p>
