您好,我有一个关于 javascript 的问题。我在导航栏上有一个菜单链接下拉菜单和一个technology.php
带有选项卡的页面。
单击菜单时我需要它,例如 IT 服务。它将重定向到tehcnology.php
页面并打开 IT 服务选项卡的选项卡和内容。
我制作了如下的javascript代码。但不能正常工作。
有什么不对或遗漏的吗?请帮我
导航栏上的链接
<li class="nav-item dropdown" id="technologyMenu">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Solutions
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="technology.php">Technology</a>
<a class="dropdown-item" href="technology.php#datcom">Data Communication & Internet</a>
<a class="dropdown-item" href="technology.php#it-services">IT Services</a>
<a class="dropdown-item" href="technology.php#managed-services">Managed Services</a>
<a class="dropdown-item" href="technology.php#smart-city">Smart City</a>
</div>
</li>
technology.php 页面上的选项卡
<div class="navigations-tab">
<div class="menu-tab">
//Menu Tab
<div class="tab-button active" id="technology">
<span>All Technology</span>
</div>
<div class="tab-button" id="datcom">
<span>Data Communication & Internet</span>
</div>
<div class="tab-button" id="it-services">
<span>IT Services</span>
</div>
<div class="tab-button" id="managed-services">
<span>Managed Services</span>
</div>
<div class="tab-button" id="smart-city">
<span>Smart City</span>
</div>
</div>
//Tab Content
<div class="tab-box-content technology active-block">
Tab for Tech
</div>
<div class="tab-box-content datcom">
Tab for Data Communication
</div>
<div class="tab-box-content it-services">
Tab for IT Services
</div>
<div class="tab-box-content managed-services">
Tab for Managed Services
</div>
这适用于所有页面,所以我将这段代码放在 footer.php 文件中。我将几个部分分开,例如页眉,页脚
有只小跳蛙
相关分类