title: Javascript cloneNode is not a function
body: <p>I have few spans:</p>
  
  <pre><code>&lt;span name="5"&gt;a&lt;/span&gt;
  &lt;span name="5"&gt;b&lt;/span&gt;
  &lt;span name="5"&gt;c&lt;/span&gt;
  &lt;span name="5"&gt;d&lt;/span&gt;
  </code></pre>
  
  <p>I use <code>getElementsByName</code> to get the span collection: </p>
  
  <p><code>var spans = document.getElementsByName("5");</code></p>
  
  <p>What I did next is clone the spans and put it into another span container:</p>
  
  <pre><code>var clonedSpan = spans.cloneNode(true);
  var container = document.createElement("span");
  container.appendChild(clonedSpan);
  </code></pre>
  
  <p>But the exception happens saying spans.cloneNode is not a function.</p>
  
  <p>Any idea why?</p>