<html>
<head>
<script language="javascript">
function showit()
{
  document.all["div1"].style.display="block";
}
function hideit()
{
  document.all["div1"].style.display="none"; //不能写成:  document.all["div1"].style="display:none";
}
</script>
</head>
<body>
<input type="button" value="show div" onclick="showit()">
<input type="button" value="hide div" onclick="hideit()">
<div id="div1">this is a div content</div>
</body>
</html>