Files
aifo-portal-web/assets/js/include.js
T
steven 4d30803b60 Initial commit: AIFO official portal web.
Add static site, shared layout, and Node dev server with standard .gitignore.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 15:29:50 +08:00

8 lines
229 B
JavaScript

document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('[data-include]').forEach(el => {
fetch(el.dataset.include)
.then(res => res.text())
.then(html => el.innerHTML = html);
});
});