如何在手风琴窗格中使用asp按钮在4个DIV之间切换

时间:2013-07-27 02:04:00

标签: javascript asp.net

这是我的手风琴小组。

 <asp:Accordion ID="Accordion1" runat="server" SelectedIndex="0" 
    FadeTransitions="true" TransitionDuration="300" FramesPerSecond="50" 
    Width="292px" Height="199px">
  <Panes>
  <asp:AccordionPane ID="AccordionPane1" runat="server">
  <Header>Business Services</Header>
   <Content>
   <asp:Button ID="btnBusiness" runat="server" Text="Business Services"   divId="showBusiness"  OnClientClick="showDiv('showBusiness');return false"
    Height="25px" Width="200px"/>
  </Content>
  </asp:AccordionPane>
     <asp:AccordionPane ID="AccordionPane2" runat="server">
     <Header>Communications</Header>
     <Content>
     <asp:Button ID="btnCommunication" runat="server" Text="Communications"    divId="showBusiness"  OnClientClick="showDiv('showCommunications');return false"
    Height="25px" Width="200px"   />
     </Content>
     </asp:AccordionPane>
</Panes>
</asp:Accordion>

现在我有几个div

 <div id="showBusiness"  class="toggleDiv" style="margin-left:65px; display:none" >

 </div>

<div id="showCommunications"  class="toggleDiv" style="margin-left:65px; display:none" >

  </div>

<div id="showEntertainment"  class="toggleDiv"  style="margin-left:65px; display:none" >
</div>

同样,我在手风琴面板和相应的div上还有3个按钮,但是我无法在div之间切换。我怎么能用javascript做到这一点。感谢

0 个答案:

没有答案