HTML inherit page layout

淺唱寂寞╮ 提交于 2019-12-06 05:29:03

问题


Is it possible to have a regular html page inherit its layout from another html page? If so, what is the most advisable approach for doing this? I know that aspx uses .master pages to hold the elements common to all pages in the site.


回答1:


You could fetch resources using JS and AJAX if you absolutely cannot use a serverside language.

how can we avoid header and footer code repeating in each html pages

Jekyll works too: What is the best way to manage duplicate code in static HTML websites




回答2:


You could also use get variables and php functions to create and display the content dynamically and avoid using more that one HTML



来源:https://stackoverflow.com/questions/8339085/html-inherit-page-layout

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