<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div>
<div>
<p>Test01</p>
<ul>
<li>total:</li>
<li>link:</li>
<li>
<input type="button" id="button_01" value="显示" onclick="controlDIV(divID='div_01', buttonID='button_01')" />
<div id="div_01" style="display: none">
<table border="1px" cellspacing="0">
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
</table>
</div>
</li>
</ul>
</div>
<div>
<p>Test02</p>
<ul>
<li>total:</li>
<li>link:</li>
<li>
<input type="button" id="button_02" value="显示" onclick="controlDIV(divID='div_02', buttonID='button_02')"/>
<div id="div_02" style="display: none">
<table border="1px" cellspacing="0">
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
</table>
</div>
</li>
</ul>
</div>
<div>
<p>Test03</p>
<ul>
<li>total:</li>
<li>link:</li>
<li>
<input type="button" id="button_03" value="显示" onclick="controlDIV(divID='div_03', buttonID='button_03')"/>
<div id="div_03" style="display: none">
<table border="1px" cellspacing="0">
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
</table>
</div>
</li>
</ul>
</div>
<div>
<p>Test04</p>
<ul>
<li>total:</li>
<li>link:</li>
<li>
<input type="button" id="button_04" value="显示" onclick="controlDIV(divID='div_04', buttonID='button_04')"/>
<div id="div_04" style="display: none">
<table border="1px" cellspacing="0">
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
</table>
</div>
</li>
</ul>
</div>
<div>
<p>Test05</p>
<ul>
<li>total:</li>
<li>link:</li>
<li>
<input type="button" id="button_05" value="显示" onclick="controlDIV(divID='div_05', buttonID='button_05')"/>
<div id="div_05" style="display: none">
<table border="1px" cellspacing="0">
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
<tr>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
<td>123456</td>
</tr>
</table>
</div>
</li>
</ul>
</div>
</div>
</body>
<script language="JavaScript" type="text/javascript">
function $(id)
{
return document.getElementById(id);
}
function controlDIV(divID, buttonID)
{
if ($(divID).style.display!="none")
{
$(divID).style.display="none";
$(buttonID).value="显示";
}
else{
$(divID).style.display="block";
$(buttonID).value="隐藏";
}
}
</script>
</html>
引用段落
网友评论