Home  >  Article  >  Web Front-end  >  In an html web page, can I quote other html codes? _html/css_WEB-ITnose

In an html web page, can I quote other html codes? _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:10:241233browse

As the title says, multiple web pages have a title bar menu.
The code to implement this title menu is the same in each web page.
It is no problem to copy and paste it into the code of each web page.
But when I need to modify the code that implements the title bar menu in the future,
the code in each web page must be updated manually.
I think this is too troublesome.
Is there a way?
Like include

,
the repeated code is written in one file,
can be used directly when other web pages need to use it,
modify this file, the effect of other web pages will also change. .


Reply to discussion (solution)

iframe can be implemented

http://www.w3school.com.cn/tags/ tag_iframe.asp

If the call is the same, it should be written like this

Man, I feel that what you actually need is php, not html. You can know C, and php is not difficult.
With php, these problems are not a problem.
Include is up to you, include_once is also available.

Any server language can be included
You don’t even need any server language. The web server is set to allow server-side inclusion. If you rename your html file to shtml, you can use include

Also It can be like the iframe

mentioned above, or you can use js document.write("

")

Of course, ajax can also be used

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn