18 January 2014

Hide class in javascript


 Html code

<div class="div1">  
Hi this is adi.jc
</div>


Javascript code

document.getElementsByClassName(div1)[0].style.visibility='hidden';

No comments:

Post a Comment