title: How to return Element ID instead of [object HTMLDivElement] (Prototype.js)
body: <p>I know this is simple, but I can't wrap my head around it.  Currently the following code returns "[object HTMLDivElement],[object HTMLDivElement]" I'd like it to return "div1,div2".  Any thoughts?  Thanks guys.</p>
  
  <pre><code>&lt;HTML&gt;
  &lt;HEAD&gt;
  &lt;script type="text/javascript" src="path_to/prototype.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  function linkClick ()
  {
      alert($$('div.basic'));
  }
  &lt;/script&gt;
  &lt;/HEAD&gt;
  &lt;BODY&gt;
     &lt;div id="div1" class="basic" onclick="linkClick();"&gt;&lt;/div&gt;
     &lt;div id="div2" class="basic" onclick="linkClick();"&gt;&lt;/div&gt;
  &lt;/BODY&gt;
  &lt;/HTML&gt;
  </code></pre>