You need to provide the div id you want to show / hide and then use this code:
HTML:
<div id="one"> <div id="tow"> This is text </div> <button onclick="javascript:showDiv();">Click to show div</button> </div>
JavaScript:
function showDiv() { div = document.getElementById('tow'); div.style.display = "block"; }
CSS
#tow { display: none; }
Fiddle: http://jsfiddle.net/xkdNa/
source share