HTML - 'Persistance Navbar'? [英] HTML - 'Persistance Navbar'?

查看:112
本文介绍了HTML - 'Persistance Navbar'?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



index.html:

 < title> Awesome Website< / title> 
< link href =navbar.html =i-dunno-what-to-put-heretype =text / html/>
< p>内容< / 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>

非常多 - 所有页面都链接到navbar.html,并且导航栏中有一处更改,那么所有页面都会更改。



有谁知道这是否可行/如何操作?
任何帮助将不胜感激。

解决方案

我使用的PHP包括像JEES提到的那样。 $ b

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.

解决方案

I used PHP include like JEES mentioned.

这篇关于HTML - 'Persistance Navbar'?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆