Answers for "button onclick text is hide"

0

html click hide textbox

//hide
document.getElementById("idOfTextField").style.display = 'none';

//visible
document.getElementById("idOfTextField").style.display = '';
Posted by: Guest on November-25-2020
1

JS Show/hide when button is clicked

var toggle  = document.getElementById("toggle");
var content = document.getElementById("content");

toggle.addEventListener("click", function() {
  content.classList.toggle("show");
});
Posted by: Guest on November-25-2021

Browse Popular Code Answers by Language