📌  相关文章
📜  页面加载后执行的 JavaScript - Javascript 代码示例

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

代码示例2
/* javascript function is executed after 5 seconds page was loaded */
window.onload = function() {
   setTimeout(loadAfterTime, 5000)
}; 
 
function loadAfterTime(){
   document.getElementById("menu").style.display="block";
}