Why exectuing function doesnt work?
<p>I have an input  which when im clicking - i want to see alert with '1,2,3,4...' (each press)</p>

<pre><code>&lt;input type='button' value='press' onclick='Clicked();'  /&gt;

 &lt;script&gt;
  var t
    function Clicked()
      {
        t=func;
        t();
      }  


     function func()
      {
        var count=0;
         return new  function ()   // &lt;===  new or not new ???
          {
          count++;
          alert(count);
          }
      }
 &lt;/script&gt;      

If im adding the 'new' in the return and click , it says : '1,1,1,1,...'
</code></pre>

<p>If im removing the 'new' it doesnt work...</p>

<p>My goal is to use this to get : '1,2,3,4...'</p>

<p>Can someone explain to me what happens ?</p>
