1

这是我的手风琴面板。

 <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做到这一点。谢谢

4

0 回答 0