2008-07-28

* diff style.display, style.visibility

<html>
<head>
<script type='text/javascript'>
function func1(type)
{
document.all['obj1'].style.display= type;
}

function func2(type)
{
document.all['obj2'].style.visibility = type;
}
</script>
</head>
<body>

<hr>
<span id='obj1'><table border=1 width=100 height=20><tr><td align='center'>obj1</td></tr></table></span>
<hr>
<span id='obj2'><table border=1 width=100 height=20><tr><td align='center'>obj2</td></tr></table></span>
<hr>

<table border=0>
<tr><td><a href="javascript:func1('none')">display none</a></td><td>  </td><td><a href="javascript:func2('hidden')">visibility hidden</a></td></tr>
<tr><td><a href="javascript:func1('block')">display block</a></td><td>  </td><td><a href="javascript:func2('visible')">visibility visible</a></td></tr>
</table>

</body>
</html>

0 Comments:

Post a Comment

<< Home