Home > Web Front-end > JS Tutorial > body text

Inject HTML snippet from file

Susan Sarandon
Release: 2024-11-07 08:18:03
Original
277 people have browsed it

A question on stackoverflow:

Include another HTML file in a HTML file

I was playing around and came up with a clean way to do it with:
1) Reading a content of the file with fetch()
2) Rendering a DOM Node from string
3) Replacing

Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template