以下选项卡适用于外部 js 文件。如何添加链接,以便当用户单击链接 www.ll.com/#comments 时,他将看到评论..tab http://www.dynamicdrive.com/动态索引17/tabcontent/tabcontent.js
<ul id="countrytabs" class="shadetabs">
<li><a href="#movies" rel="tutorial" class="selected">Tutorial</a></li>
<li><a href="#Comments" rel="comments">Comments</a></li>
</ul>
<div class="contentbox">
<div id="movies" class="tabcontent">
Download movies here
</div>
<div id="comments" class="tabcontent">
</div>
<script type="text/javascript">
var countries=new ddtabcontent("countrytabs")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()
</script>