title: Changing Grayscale with a Script
body: <p>Why does grayscale can be changed using a button:</p>
  
  <pre><code>&lt;button type="button" 
  onclick="document.getElementById('id1').style.filter = 'grayscale(100%)'"&gt;
  </code></pre>
  
  <p>But not if I put it in a script?</p>
  
  <pre><code>&lt;script&gt;
  document.getElementById("id1").style.filter = "grayscale(100%)";
  &lt;/script&gt;
  </code></pre>
  
  <p>I'm trying to make an image grayscale 100% by default (Using a script) and then changing it's grayscale property with a button. Button works fine, the script does not.</p>