Equivalent of include() in HTML

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

    Almost 10 years later, some people may still have doubts about this. So I'm going to explain a simple solution that we have today in 2020.

    I always use the jquery .load() function and never had a problem with that.

    Exemple: ( "#content" ).load( "includes/menu.html" );
    

提交回复
热议问题