Include HTML Files In HTML – Includer.js

Category: Javascript | May 28, 2024
Author:lassejlv
Views Total:53 views
Official Page:Go to website
Last Update:May 28, 2024
License:MIT

Preview:

Include HTML Files In HTML – Includer.js

Description:

Includer.js is a tiny JavaScript library that enables you to inject HTML content into the current page from external HTML files via XMLHttpRequest.

The main goal of this library is to include HTML pages with no PHP required, just as embedding JavaScript and CSS3 into the document.

See Also:

How to use it:

1. Load the Includer.js library in the document.

<script src="https://unpkg.com/[email protected]/dist/index.js"></script>

2. Add the <include> component to the page and specify the path to the external HTML files.

<include path="header.html"></include>
<include path="footer.html"></include>

Changelog:

05/28/2024

  • Refactor

11/01/2022

  • Small changes on the this.status

10/28/2022

  • Small changes on the this.status

You Might Be Interested In:


Leave a Reply