style display block in javascript [Resolved]

Posted by Anu_dgr8 under JavaScript on 9/27/2010 | Points: 10 | Views : 64901 | Status : [Member] | Replies : 3
What does style display block do in javascript ?

Thanks and Regards,
Hoosha Boosha



Responses

Posted by: SheoNarayan on: 9/28/2010 [Administrator] HonoraryPlatinum | Points: 50

Up
0
Down

Resolved
This is the same as I have given in the example.

This will hide the Label. Read javascript tutorials http://www.w3schools.com/js/default.asp that will give you much insight into how it happens.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Anu_dgr8, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: SheoNarayan on: 9/27/2010 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Looks like there is object called style display in the javaScript, however I can guess you are talking about html elements attributes that can be set using javascript and used to show or hide an html element.

for example

document.getElementById('divId').style.display='none'; // will hide the html element having id 'divId'

document.getElementById('divId').style.display=''; // will show the html element having id 'divId'


Hope this will help


Regards,
Sheo Narayan
http://www.dotnetfunda.com

Anu_dgr8, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Anu_dgr8 on: 9/28/2010 [Member] Starter | Points: 25

Up
0
Down
i was talking about the attributes in javascript...i have something like this..Lable.style.display = 'block';

what will this do?

Thanks and Regards,
Hoosha Boosha

Anu_dgr8, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response