搜索帮助 目录 搜索 这三个目录,分别是三个div
点搜索帮助时隐藏其它两个div
点目录,隐藏其它两个div
点搜索,隐藏其它两个div
页面第一次加载的时候是目录的那个div显示
现在搜索的div下有个服务器控件botton
当点button的时候就会又显示目录div下的内容而搜索帮助div和搜索div又被隐藏
可不可以点完button后仍然搜索div是显示的,搜索帮助div和目录div是隐藏的把这三个 div做成一个用户控件?
或者用iframe?
可行?具体的做法是什么
点搜索帮助时隐藏其它两个div
点目录,隐藏其它两个div
点搜索,隐藏其它两个div
页面第一次加载的时候是目录的那个div显示
现在搜索的div下有个服务器控件botton
当点button的时候就会又显示目录div下的内容而搜索帮助div和搜索div又被隐藏
可不可以点完button后仍然搜索div是显示的,搜索帮助div和目录div是隐藏的把这三个 div做成一个用户控件?
或者用iframe?
可行?具体的做法是什么
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script type="text/javascript">
function show()
{
document.getElementById("div").style.display="block";
}
function hide()
{
document.getElementById("div").style.display="none";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="Button1" type="button" value="显示" onclick="show()" />
<input id="Button2" type="button" value="隐藏" onclick ="hide()" />
</div>
<div id="div">i am div</div>
</form>
</body>
</html>
{
Response.Write("<script>var nowshowdiv='div1';</script>");//打出一个当前显示的标识
}页面:
<script>
if(nowshowidv)
{
//..显示div1
}
else
{
//你原来的
}
document.getElementById("divid").style.display="none";隐藏