“скрыть элемент JS” Ответ

скрыть элемент JS

function showStuff(id, text, btn) {
    document.getElementById(id).style.display = 'block';
    // hide the lorem ipsum text
    document.getElementById(text).style.display = 'none';
    // hide the link
    btn.style.display = 'none';
}
Grieving Gecko

скрыть элемент JS

//hidden attribute
document.getElementById("the-element-id").hidden=true
document.getElementById("the-element-id").setAttribute("hidden",true)
//style attribute
document.getElementById("the-element-id").style.display="none"
FrostyAnimations126

JS Hide Div

//If you have jquery, you can use the following method:
$("#mydiv").hide(); //hides div.
$("#mydiv").show(); //shows div.
//If you don't have jquery...
//search up the following: html how to add jquery
Determined Programmer

Ответы похожие на “скрыть элемент JS”

Вопросы похожие на “скрыть элемент JS”

Больше похожих ответов на “скрыть элемент JS” по JavaScript

Смотреть популярные ответы по языку

Смотреть другие языки программирования