загрузилась куда? или откуда? если ты имеешь ввиду свою страницу....ну хз, помести в самый низ страницы надпись "Йа загрузилося"...если надпись есть, знач страница загрузилась))) можно и на английском: I`m loaded на немецком: Ich bin füllen на французском: me prendere il carico на испанском: yo cargarse
PHP: <body> <div id="PageIsLoading" style="position: absolute; display: block; padding-left: 44px; padding-right: 12px; width: auto; height: 46px; line-height: 46px; border: 1px solid #6A919F; color: #000000; font-weight: bold; font-family: verdana; font-size: 10; background-color: #DEE6EA; background-image: url(images/loading.gif); background-position: 6px center; background-repeat: no-repeat;"> <script type="text/javascript"> if (typeof window_width == 'undefined' || typeof window_height == 'undefined') { var window_width; var window_height; if( typeof( window.innerWidth ) == 'number' ) { window_width = window.innerWidth; window_height = window.innerHeight; } else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { window_width = document.documentElement.clientWidth; window_height = document.documentElement.clientHeight; } else if(document.body && (document.body.clientWidth || document.body.clientHeight)) { window_width = document.body.clientWidth; window_height = document.body.clientHeight; } } var left = Math.round((window_width - 200) / 2); var top = Math.round(((window_height - 46) / 3) + 46); document.getElementById('PageIsLoading').style.left = left+'px'; document.getElementById('PageIsLoading').style.top = top+'px'; </script> Загрузка... </div> ЗДЕСЬ КОД СТРАНИЦЫ ЛАЛАЛАЛАЛАА ЛАЛАЛАЛАЛАЛАЛАЛАЛАЛА АЛЛАЛААЛЛАЛАА <script type="text/javascript"> function PageHide() { document.getElementById('PageIsLoading').style.display = 'none'; } if(window.addEventListener) { window.addEventListener('load', PageHide, false); } else if(window.attachEvent) { var r = window.attachEvent("onload", PageHide); } else { PageHide(); } </script> Собственно пример
Ну вот простейший пример: Code: <body onload="[B][COLOR=YellowGreen]document.getElementById('xek').innerHTML = ''[/COLOR][/B]"> <div id="xek" align="center">Loading...</div> <iframe src="/"></iframe> </body> Вобщем оператор onload выполняет JS после загрузки.
Да, работает. Но в IE есть баг, из-за которого onload иногда срабатывает раньше при каких-то условиях.