Skip to content

Commit

Permalink
Fix: changed innerHTML to innerTEXT
Browse files Browse the repository at this point in the history
innerHTML is used for inserting html tags within another html tags. If we just want to modify the content we will use innerTEXT
  • Loading branch information
aditya81070 authored Oct 1, 2018
1 parent dad7b46 commit e31cc51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js-char-counter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ <h3>Chars: <span id="count">0</span></h3>
<textarea id="text" rows="20" cols="100"></textarea>
<script>
setInterval(() => {
document.getElementById("count").innerHTML = document.getElementById("text").value.toString().length;
document.getElementById("count").innerText = document.getElementById("text").value.toString().length;
}, 100);
</script>
</div>
</div>
</body>
</html>
</html>

0 comments on commit e31cc51

Please sign in to comment.