选项卡导航 - 记住用户选择
我正在为我的子页面产品使用TAB导航 - >(请参阅下面的代码,网站是用HTML和PHP实现的)?p=products
问题:
例如,用户单击第二个 TAB 中的链接“详细信息”。然后他使用后退按钮。现在他回到了产品网站,但不是在第二个选项卡中,而是在第一个选项卡中。
我想记住上次使用的选项卡(此处:),如果用户返回产品页面。href="#section-2"
我怎样才能意识到这一点?
<div id="tabs" class="tabs">
    <nav>
        <ul>
            <li><a href="#section-1" class="icon-cross"><span>Product 1</span></a></li>
            <li><a href="#section-2" class="icon-cross"><span>Product 2</span></a></li>
            <li><a href="#section-3" class="icon-cross"><span>Product 3</span></a></li>
            <li><a href="#section-4" class="icon-cross"><span>Product 4</span></a></li>
        </ul>
    </nav>
    <div class="content">
        <section id="section-1">
            <div class="tab-heading">
                <hr>
                <h2 class="intro-text text-center"><strong>Product 1</strong></h2>
                <hr>
            </div>
            ...
        </section>
        <section id="section-2">
            <div class="tab-heading">
                <hr>
                <h2 class="intro-text text-center"><strong>Product 2</strong></h2>
                <hr>
            </div>
            <a href="?p=details">Details</a>
        </section>
    </div>
</div>