Make header and footer files to be included in multiple html pages

前端 未结 11 2021
無奈伤痛
無奈伤痛 2020-11-22 06:49

I want to create common header and footer pages that are included on several html pages.

I\'d like to use javascript. Is there a way to do this using only html and

11条回答
  •  耶瑟儿~
    2020-11-22 07:46

    Save the HTML you want to include in an .html file:

    Content.html

    Google Maps
    Animated Buttons
    Modal Boxes
    Animations
    Progress Bars
    Hover Dropdowns
    Click Dropdowns
    Responsive Tables

    Include the HTML

    Including HTML is done by using a w3-include-html attribute:

    Example

        

    Add the JavaScript

    HTML includes are done by JavaScript.

        
    

    Call includeHTML() at the bottom of the page:

    Example

    
    
    
    
    
    

提交回复
热议问题