+ 1
How can I make a loading page with window.onload??
8 Antworten
+ 3
<p id="del">Loading </p>
<script>
window.onload = function (){
document.getElementById("del").style.display ="none";}
</script>
note that this could not work in some browsers so you can use this:
<body onload="func()">
<p id="del">Loading </p>
<script>
function func(){
document.getElementById("del").style.display ="none";
}
</script></body>
+ 2
what exactly do you want to load with the page?
usually you make a function and call it in the onload event
+ 1
Are yo sure that it works??
0
No I want to make a <p> tag that it write loading.. and when the page loaded the <p> tag get's delet
0
not sure you would be able to see it unless the page too big and very slow to load (usually its fast) but the code does what it sais
0
ok
0
Thank you so much
0
most welcome ^^