adding onfocus event handler to every element
<p>I'm getting an undefined message on all of my handlers. I want to bind a handler to every element and want to output the value. What is wrong with this code? Thanks! </p>

<pre><code> for (var i = 0; i &lt; document.forms[0].elements.length; i++ ){
  document.forms[0].elements[i].onfocus = test(this);
 }

 function test(ele){
  alert(ele.value);

 }
</code></pre>
