代码是比较简化了的,比较直观的
同一个页面,点击搜索按钮,打开之前隐藏没有显示的层,并将搜索的值显示出来,怎么实现?程序是用PHP
不知道描述清楚没有。
类似于www.1100dc.com网站的搜索效果。function showdiv(tabadnum,n)
{
for(i=0;i<n;i++){
  if(i==tabadnum){
       document.getElementById("content_"+i).style.display="block";
  }
  else{
       document.getElementById("content_"+i).style.display="none";
  }
  }
}<input name="serach_area" type="text" id="serach_area" value="输入你所在楼盘" />
<input type="submit" name="button" id="submit" value="搜索" onClick="showdiv(6,7);return false;" /><DIV style="DISPLAY: none" id=content_0>
<DIV style="overflow:scroll;overflow-x:hidden; Z-INDEX: 110; POSITION: absolute; TEXT-ALIGN: center; WIDTH: 620px; BACKGROUND: #ffffff; HEIGHT: 202px; MARGIN-LEFT: -185px; TOP: 480px; LEFT: 50%">
这里显示搜索输入的值
</DIV></DIV>

解决方案 »

  1.   

    ScriptManager
    UpdatePanel
    UpdateProgress
    三个控件简单例子:
    <form id="form1" runat="server">    <div>        <asp:Label ID="lheader" runat="server" Font-Bold="True" Font-Size="Large" Text="使用UpdateProgress控件"></asp:Label><br />        <hr />        &nbsp;</div>        <asp:ScriptManager ID="ScriptManager1" runat="server">        </asp:ScriptManager>        <asp:UpdatePanel ID="UpdatePanel1" runat="server">            <ContentTemplate>             <asp:Label ID="linfo" runat="server" Text="单击下面按钮进行测试"></asp:Label><br />                <asp:Button ID="btTest" runat="server" OnClick="btTest_Click" Text="测试" /><br />                <asp:Label ID="lResult" runat="server"></asp:Label>            </ContentTemplate>        </asp:UpdatePanel>        <asp:UpdateProgress ID="UpdateProgress1" runat="server">            <ProgressTemplate >                <div id="iLoading" style="font-weight: bold; font-size: large; left: 20px; text-transform: capitalize; color: red; font-family: Monospace; position: absolute; top: 50px; background-color: #99ccff;">                    Loading......               
                    </div>            </ProgressTemplate>        </asp:UpdateProgress>    </form>

    里面的逻辑自己拓展一下就ok了