title: Javascript function - style change not working
body: <p>I created a 2 simple functions but function 2 doesn't work, I tried to change it to <code>style.font-weight = &quot;bold&quot;;</code> but then all crashes, what to do?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function validate() {
    if (document.getElementById('remember').checked) {
      document.getElementById("text").innerHTML = "HELLO WORLD!";
    } else {
      document.getElementById("text").innerHTML = "hello world!";
    }
  }
  
  function validate2() {
    if (document.getElementById('remember2').checked) {
      document.getElementById("text").style = "bold";
    } else {
      document.getElementById("text").style = "normal";
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="text" style="font-weight: normal"&gt;hello world!&lt;/div&gt;
  &lt;input id="remember" type="checkbox" onclick="validate()"&gt;Caps&lt;/input&gt;
  &lt;br&gt;
  &lt;input id="remember2" type="checkbox" onclick="validate2()"&gt;Bold&lt;/input&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Is that a chrome problem or something?</p>