I\'m making a mini-game where a player attacks a npc and in the center is a white box (div) that I call (log), because when the player damages/attacks the npc, I want to be
You can use one of the following methods:
document.getElementById('log').innerHTML = "text"; document.getElementById('log').innerText = "text"; document.getElementById('log').textContent = "text";
For Jquery:
$("#log").text("text"); $("#log").html("text");