Equivalent of include() in HTML

后端 未结 11 558
有刺的猬
有刺的猬 2020-11-29 06:40

I was wondering wether there is a way to include some html content inside another html using only html?

A replacement to PHP\'s



        
11条回答
  •  独厮守ぢ
    2020-11-29 07:15

    The lack of Include\Import in Html is really frustrating!

    A good alternative is "Server Side Includes (SSI)" in case "PHP" is not supported!

    SSI is supported by almost any (if not all) web host server!

    
    

    The file that contains the above line must end with ".shtml" or ".shtm" extensions!


    It's really annoying that something as easy as Include\Import can't be performed by the browser itself!

    Like php or Node.js, preprocessing the html using Javascript itself before the HTML Load process start should be supported in any browser!

提交回复
热议问题