<div class="footer_links">
<ul class="foot">
<li><a href="../about_us/about.html#companyVision">Company Vision<span class="underline"></span></a></li>
<li><a href="../about_us/about.html#mgtTeam">Management Team<span class="underline"></span></a></li>
<li><a href="../about_us/about.html#indLeadership">Industry Leadership<span class="underline"></span></a></li>
<li><a href="../about_us/about.html#ThoughtLead">Thought Leadership<span class="underline"></span></a></li>
<li><a href="../offerings/offer.html">Offerings<span class="underline"></span></a></li>
<li><a href="../contactus/contact.html">Contact Us<span class="underline"></span></a></li>
</ul>
</div>
在上面的代码中,我有4个页脚链接,它将导航到相应的页面。假设我点击“公司愿景”它将导航。但之后,如果我点击任何其他链接,它不导航。所有页面的页脚都相同。我正在检查点击事件是否正在发生,导航到链接后没有检测到。有人可以帮我这个。
答案 0 :(得分:0)
这里的问题将是,第一次无论是哪个about.html#????你点击它第一次工作。但是,由于您已经在about.html页面上,因此在第一个点击后没有点击,因此请假设:
<div class="footer_links">
<ul class="foot">
<li><a href="../about_us/about.html#companyVision">Company Vision<span class="underline"></span></a></li>
<li><a href="../about_us/about.html#mgtTeam">Management Team<span class="underline"></span></a></li>
<li><a href="../about_us/about.html#indLeadership">Industry Leadership<span class="underline"></span></a></li>
<li><a href="../about_us/about.html#ThoughtLead">Thought Leadership<span class="underline"></span></a></li>
<li><a href="../offerings/offer.html">Offerings<span class="underline"></span></a></li>
<li><a href="../contactus/contact.html">Contact Us<span class="underline"></span></a></li>
</ul>
</div>
<div class="footer_links">
<ul class="foot">
<li><a href="#companyVision">Company Vision<span class="underline"></span></a></li>
<li><a href="#mgtTeam">Management Team<span class="underline"></span></a></li>
<li><a href="#indLeadership">Industry Leadership<span class="underline"></span></a></li>
<li><a href="#ThoughtLead">Thought Leadership<span class="underline"></span></a></li>
<li><a href="../offerings/offer.html">Offerings<span class="underline"></span></a></li>
<li><a href="../contactus/contact.html">Contact Us<span class="underline"></span></a></li>
</ul>
</div>
但最后我会建议您更改文件/文件夹结构
<div class="footer_links">
<ul class="foot">
<li><a href="about.html#companyVision">Company Vision<span class="underline"></span></a></li>
<li><a href="about.html#mgtTeam">Management Team<span class="underline"></span></a></li>
<li><a href="about.html#indLeadership">Industry Leadership<span class="underline"></span></a></li>
<li><a href="about.html#ThoughtLead">Thought Leadership<span class="underline"></span></a></li>
<li><a href="offer.html">Offerings<span class="underline"></span></a></li>
<li><a href="contact.html">Contact Us<span class="underline"></span></a></li>
</ul>
</div>
onClick="window.location.reload()