Hackerss.com

Hackerss.com is a community of amazing hackers

Hackerss is a community for developers, data scientitst, ethical hackers, hardware enthusiasts or any person that want to learn / share their knowledge of any aspect of digital technology.

Create account Log in
hackerss
hackerss

Posted on

Javascript Change inner html of a div


//select the div with id of "comments"
const comments = document.getElementById("comments");

//change the inner html of the div with id of "comments" to "Hello World!"
comments.innerHTML = "Hello World!";


Enter fullscreen mode Exit fullscreen mode

Top comments (0)