原生Js中的onLoad事件
document.addEventListener('DOMContentLoaded', (event) => { console.log('DOM fully loaded and parsed'); // DOM 完全加载以及解析 });
document.addEventListener('DOMContentLoaded', (event) => { console.log('DOM fully loaded and parsed'); // DOM 完全加载以及解析 });