로딩 레이어 만들기

<script  type="text/javascript">
var timer_loading=null;
function loading_st(){
 var ct_left = (parseInt(window.screen.width)-450)/2;
 var ct_top = (parseInt(window.screen.height))/3;
 layer_str = "<div id='loading_layer' style='position:xss__; font-size:11pt; left:"+ct_left+"px; top:"+ct_top+"px; width:400px; padding:50px; text-align:center; vertical-align:middle; z-index:1000; font-weight: bold;'>로딩중입니다.</div>"
 document.write(layer_str);
 timer_loading = setTimeout('self.document.location.reload()',4000) //4초 동안 페이지 로딩이 완료 안되면 리로드 한다.);

 if(window.attachEvent){
 window.attachEvent('onload', loading_ed)
 }else{
 window.addEventListener('load', loading_ed, false)
 }
}
function loading_ed(){
 var ta =document.getElementById('loading_layer');
 ta.style.display='none';
 clearTimeout(timer_loading)
}
loading_st();
</script>

댓글
  • No Nickname
    No Comment
  • 권한이 없습니다.
    {{m_row.m_nick}}
    -
목록형 📷 갤러리형
제목
[기본형] HTML (with 부트스트랩5.3 , jquery 3.7, vue.js)
유용한 리눅스(LINUX) 명령어
[공지] 기술 게시판
4.28
4.29
4.30
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
5.11
5.12
5.13
5.15
5.16
5.17
5.18
5.19
5.20
5.21
5.22
5.23
5.24
5.25
5.26
5.27
5.28
5.29
5.30
5.31
6.1