📌  相关文章
📜  在页面加载时触发一些 javascript - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:08.133000             🧑  作者: Mango

代码示例1
document.addEventListener("DOMContentLoaded", theDomHasLoaded, false);
window.addEventListener("load", pageFullyLoaded, false);

function theDomHasLoaded(e) {
    // do something
}

function pageFullyLoaded(e) {
    // do something again
}