Equivalent of include() in HTML

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

    It cannot be done purely by HTML. (There are iframes, however, but I don't think that qualifies in this case.)

    It can be done using JavaScript. You get the other file via Ajax, and place its contents inside an HTML element on the current page.

提交回复
热议问题