how do i pass a variable to a function in this context?(for an onclickevent)
<pre><code>function check(child) { 
    var y = "&lt;span onclick=remove(" + child + ") onmouseover='hove(this)'&gt;x&lt;/span&gt;";
    child = child + " " + y;
    send = '&lt;span  class="elements" &gt;' + child + '&lt;/span&gt;' ;
 }

 function remove(child) {
    // some of mycode;
 }
</code></pre>

<p>These are the 2 functions I have. OK let me tell you this, child is a variable passed from one function to the check() function and again im trying to pass this child value to remove function, adding to the onclick event of span tag  but it does not seem to work. I am unable to get out of this.</p>

<p>I want to add onclick event to the span tag and it should pass the child value to remove function. Please help me with this. Any help is greatly appreciated. Thanks</p>
