I won't to run this function when user press the backspace (8) or enter(13).
$(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%)";
}
});
But this code doesn't work.
Thanks.