title: Javascript to get elements by its attribute
body: <pre><code>&lt;body&gt;
    &lt;span someAttribute="xyz"&gt;.....&lt;/span&gt;
    ...
    &lt;div&gt;
      ...
      &lt;span someAttribute="abc"&gt;.....&lt;/span&gt;
      ...
      &lt;div someAttribute="pqr"&gt;.....&lt;/div&gt;
      ...
    &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Here is a sample html page.. I need to select the html elements by its attributes i can get the attribute values by <code>getAttribute()</code> but i need to select all the elements first.</p>
  
  <p>How in javascript to get elements which has the attribute name as "someAttribute". Once i get the elements i can get the attribute values and use my function.</p>
  
  <p>Note: i want to do this without using jquery.</p>