【发布时间】:2015-10-23 07:23:50
【问题描述】:
我是 asp 和 css 概念的新手,在这里我遇到了一个非常基本的问题
我有一个导航栏
<li><a href = "#Div1" >Division 1</a></li>
<li><a href = "#Div2">Division 2</a></li>
我的部门如下
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<div id = "TextBox">
//a text box here which is common and should be displayed with both the sections below
</div>
<div id ="Div1" class= "section">
// some button and text boxes here
</div>
<div id ="Div2" class= "section">
// some button and text boxes here
</div>
</updatePanle>
css 文件:
.section { display:none }
.section:target { display: block }
css 文件部分定义有助于正确选择分区,但是当页面加载时,仅显示顶部 TextBox div。
所以我需要在页面加载时默认显示 div1 内容,当 TextBox div 中的文本框由一个值填充时,内容会刷新并且页面上再次没有 div1 或 div2 内容。
div 在更新面板中定义
提前感谢您期待一些帮助。
【问题讨论】: