Alias function in javascript
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/8773579/if-javascript-has-first-class-functions-why-doesnt-this-work">If Javascript has first-class functions, why doesn’t this work?</a>  </p>
</blockquote>



<p>When I try to make an alias function for <code>document.getElementById</code> as below:</p>

<pre><code>f = document.getElementById;
</code></pre>

<p>But, when I try to call:</p>

<pre><code>var e_fullname = f(“fullname”);
</code></pre>

<p>It was rised an error:  <code>Could not convert JavaScript argument</code></p>

<p>And below is OK:</p>

<pre><code>var e_fullname = f.call(document, “funname”);
</code></pre>

<p>Can you tell me why?</p>
