Event handler with parameters in dynamically created elements
<p>When I assign the event handler without parameters, it works: <a href="http://jsfiddle.net/mUj43/" rel="nofollow">http://jsfiddle.net/mUj43/</a></p>

<pre><code>function show(){
    alert('work');
}

var myButton = document.createElement("input");  
myButton.type="button";  
myButton.value="click";   
myButton.onclick=show;

var where = document.getElementById("where");
where.appendChild(myButton);  ​
</code></pre>

<p>but if I pass parameters, it doesn't work: <a href="http://jsfiddle.net/mUj43/1/" rel="nofollow">http://jsfiddle.net/mUj43/1/</a></p>

<pre><code>myButton.onclick = show('test');
</code></pre>

<p>How can I use function with parameters in dynamically created elements?</p>
