Equivalent of include() in HTML

后端 未结 11 582
有刺的猬
有刺的猬 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:23

    Shameless plug of a library that I wrote the solve this.

    https://github.com/LexmarkWeb/csi.js

    The above will take the contents of /path/to/include.html and replace the div with it.

提交回复
热议问题