I'm working with Javascript.
I need an input that at the same time I'm writing a color the body background change to that color. Also I need the background go white with the delete key.
<strike>
<!DOCTYPE html>
<html>
<body>
<p>Write a color for background</p>
<input type="text" id="myInput" oninput="colorForBack()">
<p id="demo"></p>
<script>
function colorForBack() {
var x = document.getElementById("myInput").value;
document.getElementById("demo").innerHTML = "Your color: " + x;
element.style.backgroundColor = x;
}
</script>
</body>
</html>
</strike>