title: Can i save an html collection in one var using javascript?
body: <p>i have the following html object : <a href="https://i.stack.imgur.com/ssBVc.png" rel="nofollow noreferrer">element</a></p>
  
  <p>I just want to save the value in a variable. I tried using</p>
  
  <pre><code>var result = window.content.document.getElementsByClassName("glyphicon-ok")[0].getAttribute('value');
  alert(result);
  </code></pre>
  
  <p>But return me null object. How can i save the element of this list in my var using javascript. The element is.</p>
  
  <blockquote>
    <p>glyphicon.glyphicon-ok.positive-color</p>
  </blockquote>
  
  <p>Important, check this image to check the html collection i'm trying save using javascript:</p>
  
  <p><a href="https://i.stack.imgur.com/ssBVc.png" rel="nofollow noreferrer">image</a></p>