window.onload=function() { setTimeout(func1, 2000); }; function func1() { document.getElementById("my_div").style.display = "block"; }