HTML - 'Persistance Navbar'?

好久不见. 提交于 2019-12-25 05:54:15

问题


I was wondering if it was possible to do the following in HTML.

index.html:

<title>Awesome Website</title>
<link href="navbar.html" rel="i-dunno-what-to-put-here" type="text/html"/>
<p>Content</p>

navbar.html:

<div id="navbar">
    <li><a href="1.html">1</a></li>
    <li><a href="2.html">2</a></li>
    <li><a href="3.html">3</a></li>
    <li><a href="4.html">4</a></li>
</div>

So pretty much - all pages link to the navbar.html and if there is one change in the navbar, then all the pages change.

Does anyone know if this is possible / how to do it? Any help would be much appreciated.


回答1:


I used PHP include like JEES mentioned.



来源:https://stackoverflow.com/questions/16371798/html-persistance-navbar

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!