0

i want to add an underscore to the div element every second, it only appears to happen once.

Code:

let input = document.createElement("DIV")
let space = document.createTextNode("_")

input.style.backgroundColor = "white"
input.style.width = "100%"
input.contentEditable = "true"

document.body.appendChild(input)

setInterval(function(){input.appendChild(space) }, 5000);
Quentin
  • 857,932
  • 118
  • 1,152
  • 1,264
toady
  • 1

0 Answers0