title: Press key and runs function jquery
body: <p>I won't to run this function when user press the backspace (8) or enter(13). </p>
  
  <pre class="lang-js prettyprint-override"><code>$(document).keypress(function(e) {
      if(e.which == 8) { //-- or 13
          var x = document.getElementsByTagName("BODY")[0];
          x.style.backgroundImage = "-moz-linear-gradient(--90deg, #004158 0%, #005472 100%)";
          x.style.backgroundImage = "-webkit-linear-gradient(--90deg, #004158 0%, #005472 100%)";
          x.style.backgroundImage = "-o-linear-gradient(--90deg, #004158 0%, #005472 100%)";
          x.style.backgroundImage = "linear-gradient(-180deg, #004158 0%, #005472 100%)";
      }
  });
  </code></pre>
  
  <p>But this code doesn't work.</p>
  
  <p>Thanks.</p>