<html>
<head>
<title>Js页面折叠</title>
</head>
<script type="text/javascript" language="javascript">
var show = false;
function ShowQueryOption()
{
var divQueryOptionUserControl = document.getElementById("MainComment");
var imgShow = document.getElementById("ShowComment");
if (show) {
divQueryOptionUserControl.style.display = "none";
show = false;
imgShow.src = "../Img/Plus.gif";
}
else
{
divQueryOptionUserControl.style.display = "";
show = true;
imgShow.src = "../Img/Minus.gif";
}
}
</script>
<body>
<div>
<img alt="" src="../Img/Plus.gif" id="ShowComment" onmouseover="this.style.cursor='hand'" onclick="ShowQueryOption();" />Application Comment:</div>
<div id="MainComment" runat="server" style="display: none">
<div>1</div>
<div>2</div>
<div>需要折叠的内容</div>
</div>
</body>
</html>