<html>
<head>
<script>
function divBlock()
{
var oa = document.getElementById('test');
// var ob = document.getElementById("test_a");
if(oa.style.display == "block"){
oa.style.display = "none";
// ob.innerHTML = "[+]";
}else{
oa.style.display = "block";
// ob.innerHTML = "[-]";
}
}
</script>
</head>
<body>
<div id="test" style="display:none;padding-top:50px; padding-left:50px;margin-top:100px; margin-left:100px;background-color:grey;width:200px;height:200px;color:white;
font-size:45px;"> i am here!
</div>
<form action="">
<table width="300" height="150" border="1" cellpadding="10" cellspacing="20">
<th>名称</th><th>年龄</th><th>性别</th>
<tr><td>张三</td><td>50</td><td>男</td></tr>
</table>
<input type="button" value="test" οnclick="divBlock()"></input>
</form>
</body>
</html>
<head>
<script>
function divBlock()
{
var oa = document.getElementById('test');
// var ob = document.getElementById("test_a");
if(oa.style.display == "block"){
oa.style.display = "none";
// ob.innerHTML = "[+]";
}else{
oa.style.display = "block";
// ob.innerHTML = "[-]";
}
}
</script>
</head>
<body>
<div id="test" style="display:none;padding-top:50px; padding-left:50px;margin-top:100px; margin-left:100px;background-color:grey;width:200px;height:200px;color:white;
font-size:45px;"> i am here!
</div>
<form action="">
<table width="300" height="150" border="1" cellpadding="10" cellspacing="20">
<th>名称</th><th>年龄</th><th>性别</th>
<tr><td>张三</td><td>50</td><td>男</td></tr>
</table>
<input type="button" value="test" οnclick="divBlock()"></input>
</form>
</body>
</html>