|
|
DOM visibility property - DOM
|
Views : 1064
|
|
Tagged in : DOM
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
DOM visibility property:
Visibility property is set inorder to visible or hide the image/element from display.
JavaScript Syntax:
object.style.visibility="visibility"; [visibility = "hidden/visible"]
Consider if you want to show the table in onClick(),
then your code will be like,
Javascript Code:
<script type="text/javascript">
function showTable()
{
document.getElementById("tab1").style.visibility="visible";
}
</script>
HTML Code:
<table id=tab1 border=1 style="visibility: hidden;">
<tr><td>Name</td><td>Address</td></tr>
<tr><td>HIOX</td><td>CBE</td></tr>
</table>
<input type="button" onClick="showTable()" value="Show Table">
Likewise you can display/hide images,buttons,etc., using dom visibility property.... |
|
By Ramya, On - 2008-12-09 |
|
|
|