Labels

Wednesday, December 5, 2007

Display/Visible styling property in JS

Hi,

Here, is the fact that Display/Visible styling property in JS works perfectly in IE and Firefox.

Display

· Block

· None

Visiblilty

· Visible

· Hidden

function Hide1()

{

//debugger;

obj=document.getElementById('divHidden');

if(obj.style.display == "")

{

obj.style.display='none';

}

else

{

obj.style.display='';

}

}

function Hide2()

{

obj=document.getElementById('divHidden');

if(obj.style.visibility == "")

{

obj.style.visibility='hidden';

}

else

{

obj.style.visibility='';

}

}

Thanks & Regards,

Arun Manglick || Tech Lead

No comments:

Post a Comment