how to hide and show in html element dynamically
html input element hide and show using link tag. 开发者_运维问答example:yahoo mail Bcc hide and show
This is done in Javascript.
For simple Javascript, i.e. without using jQuery
you can do that:
document.getElementById("idOfElement").style.display = "none"; // to hide
document.getElementById("idOfElement").style.display = "block"; // to show
Here is a link with the possible values for this display
CSS element.
yahoo does this with javascript.
using plaing JS on the onlick
of a link:
document.getElementById('someDiv').style.display = 'block'; //or 'none' to hide
using a JS library like jQuery:
$('#someDiv').show(); //or .hide();
精彩评论