【发布时间】:2019-05-12 01:30:22
【问题描述】:
我正在制作一个静态网站,我在其中使用 href 转到特定的 div/section 并且运行良好。但是当用户单击特定链接时,我试图从地址栏“http:localhost:3000/index.html/#about”中删除 div 的 id。
索引.html
<a href="#about">About</a>
<a href="contacts">Contacts</a>
<section id="about></section>
<section id="contacts"></section>
【问题讨论】:
-
为什么要删除它?你有什么搜索这个?
-
很确定如果没有该#id,div 导航将无法工作。
-
您可能会找到您的解决方案Here
标签: html