How to get element/component name using JavaScript?
<p>I have a webpage that contains ASP.NET panels and JavaScript that gets all of the components in the page:</p>

<pre><code>var items = Sys.Application.getComponents();
</code></pre>

<p>I need to get the name/ID of each of the elements in the items variable. I have tried the following code: (but it doesn't work)</p>

<pre><code>for (var item in items) 
{
      alert(item.name);
}
</code></pre>

<p>What attribute of 'item' contains the name/ID? How can I modify the above code to do this?</p>
