当单击查看详细信息按钮时,我希望页面跳转到“tabreveal”ID。我需要什么 JS 才能做到这一点?代码如下:
<div class="row">
<div class="span3 box1">
<h2>Web</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn" href="#web" data-toggle="tab">View details »</a></p>
</div>
<div class="span3 box2">
<h2>Video</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn" href="#video" data-toggle="tab">View details »</a></p>
</div>
<div class="span3 box3">
<h2>Print</h2>
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<p><a class="btn" href="#print" data-toggle="tab">View details »</a></p>
</div>
</div>
<div class="tab-content" id="tabreveal">
<div class="tab-pane" id="web">2</div>
<div class="tab-pane" id="video">3</div>
<div class="tab-pane" id="print">4</div>
</div>
提前感谢您的任何回复!