我正在使用 Foundation CSS 并且需要有关 section 对象的帮助。我的页面上有一个选项卡式部分
<div class="section-container tabs" data-section="tabs">
<section id="section1">
<p class="title" data-section-title><a href="#">Step 1</a></p>
<div class="content" data-section-content>
<input type="text" id="firstname" placeholder="First Name">
</div>
</section>
<section id="section2">
<div class="content" data-section-content>
<input type="text" id="phone" placeholder="Phone">
</div>
</section>
What I am trying to do is have a next button on section1 that would take me to section 2 by using this
<button class="small button" id="next1" onclick="document.getElementById('section2').className ='active';document.getElementById('section1').style ='padding-top: 49px';document.getElementById('section1').className ='';document.getElementById('section1').style ='';"> Next </button>
然而,这不起作用。发生的情况是,通过单击按钮,它会将我带到第 2 节的简短部分,然后将我带回第 1 节。有关如何解决此问题的任何帮助。