사이트 내에서 페이지 이동시 로딩중레이어 띄우기(야메버전)

--------------------------------
예제 사이트 http://58.146.212.151
--------------------------------
head.php 파일에

메타테크넣는부분에(<head></head>사이에)

<meta http-equiv="page-enter" content="blendtrans(duration=0)"/>
<meta http-equiv="page-exit" content="blendtrans(duration=0)"/>

이거를 넣습니다.

이렇게되면 링크를 눌러서 페이지를 이동할때 다음페이지가 완전히 로딩이된후 한번에 휙 넘어가거든요..(원래는 다음페이지 읽으면서 하나씩열리면서 보이잖아요)

그거를 이용해서
또 head.php 부분에

<script type="text/javascript">
function showon() {
    if(document.all.div111.style.visibility=="hidden") {
         document.all.div111.style.visibility="visible";

         return false;
    }
    if(document.all.div111.style.visibility=="visible") {
        document.all.div111.style.visibility="hidden";

        return false;
    }
}

이 레이어를 띄우는 스크립트를 암데나 넣어주시구요 요거는 걍 화면에  



메인메뉴나 서브메뉴같은곳 이나그렇곳에 링크에 암곳이나

<div id="div111" style="position:absolute; left:40%; top:40%; visibility:hidden;">
<table border=0 bgcolor=black cellspacing=0 cellpadding=0 width=220 height=90 align=center style="border:1px #999999 solid;filter:alpha(opacity=10);">
<tr><td align=center><font color=white><b>Now Loading...</b><br></td></tr></table>
</div>

을 넣고 링크된곳에

<a href=<?=$g4[path]?>/index.php onclick=showon(div111);>메인메뉴</a>

이렇게 넣어줍니다.

그러면 링크를 클릭하면 레이어가뜨게되고  다음페이지가 완전히 로딩이 끝나면 페이지가 휙 바뀝니다.


그리고
<meta http-equiv="page-enter" content="blendtrans(duration=0)"/>
<meta http-equiv="page-exit" content="blendtrans(duration=0)"/>

부분에 duration=0.3으로 모두 바꿔보세요 페이지가 신기하게열리니까 한번해보세요

테스트 홈페이지인데..
http://58.146.212.151

개인섭이라 접속이 안될수도 있습니다.

|

댓글 4개

이게 잠깐 않돼서 고생했는데;;

<script type="text/javascript">
function showon() {
if(document.all.div111.style.visibility=="hidden") {
document.all.div111.style.visibility="visible";

return false;
}
if(document.all.div111.style.visibility=="visible") {
document.all.div111.style.visibility="hidden";

return false;
}
}


</script>

넣어주세요..

무심코 붙여넣고 해보다가.. ;;
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 팁자료실

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요. 나누면 즐거움이 커집니다.

+
제목 글쓴이 날짜 조회
17년 전 조회 3,421
17년 전 조회 4,195
17년 전 조회 2,453
17년 전 조회 4,935
17년 전 조회 2,370
17년 전 조회 3,091
17년 전 조회 5,240
17년 전 조회 3,748
17년 전 조회 6,707
17년 전 조회 5,591
17년 전 조회 6,602
17년 전 조회 5,364
17년 전 조회 3,333
17년 전 조회 1만
17년 전 조회 7,031
17년 전 조회 3,969
17년 전 조회 5,548
17년 전 조회 3,447
17년 전 조회 4,474
17년 전 조회 1.3만
🐛 버그신고