title: How do I get the opacity of an element using Javascript?
body: <p>If I have:</p>
  
  <pre><code>#em {
    opacity:0.5;
  }
  </code></pre>
  
  <p>How do I get <code>#em</code>'s opacity using <code>javascript</code>? :D</p>
  
  <p>I've got troubles with the following (it returns nothing):</p>
  
  <pre><code>return document.getElementById("em").style.opacity;
  </code></pre>