Hackerss.com

hackerss
hackerss

Posted on

Ocultar un div in Javascript

Ocultar un div - Javascript:


//function to hide a div
function hideDiv(divId) {
  // get the div with the id of divId
  const div = document.getElementById(divId);

  // hide the div
  div.style.display = "none";
}

//example
hideDiv("comments");


Enter fullscreen mode Exit fullscreen mode

Top comments (0)