답변 5개 / 댓글 2개
채택된 답변
+20 포인트
스크립트에
if ( getCookie( "Notice[1]" ) != "done[1]" ){
window.open ('pop1.html','english1','left=500,top=112,width=800, height=848,scrollbars=no,toolbars=no,resizable=0');
} 가 위에 한번 아래에 한번 이렇게 2개가 있어서 그럽니다.
head 안에 있는 script 부분 삭제하시고
아래의 스크립트만 넣어세요...
Copy
<SCRIPT language=javascript>
<!--
function getCookie( name ){
var nameOfCookie = name + "=";
var x = 0;
while ( x <= document.cookie.length ){
var y = (x+nameOfCookie.length);
if ( document.cookie.substring( x, y ) == nameOfCookie ) {
if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
endOfCookie = document.cookie.length;
return unescape( document.cookie.substring( y, endOfCookie ) );
}
x = document.cookie.indexOf( " ", x ) + 1;
if ( x == 0 )
break;
}
return "";
}
var filter = "win16|win32|win64|mac";
if(navigator.platform){
if(0 > filter.indexOf(navigator.platform.toLowerCase())){
// mobile
}else{
// pc
if ( getCookie( "Notice[1]" ) != "done[1]" ){
window.open ('pop1.html','english1','left=500,top=112,width=800, height=848,scrollbars=no,toolbars=no,resizable=0');
}
}
}
//-->
</SCRIPT>
index 페이지를 열어보시면 팝업을 띄우는 스크립트 구문이 있습니다.
if ( getCookie( "Notice[1]" ) != "done[1]" ){
window.open ('pop1.html','english1','left=500,top=112,width=800, height=848,scrollbars=no,toolbars=no,resizable=0');
}
여기를 DEVICE 가 모바일인지 피씨인지 구분해서 실행하도록 하게 하면 됩니다.
EX)
Copy
<script type="text/javascript">
var filter = "win16|win32|win64|mac";
if(navigator.platform){
if(0 > filter.indexOf(navigator.platform.toLowerCase())){
// mobile
}else{
// pc
if ( getCookie( "Notice[1]" ) != "done[1]" ){
window.open ('pop1.html','english1','left=500,top=112,width=800, height=848,scrollbars=no,toolbars=no,resizable=0');
}
}
}
</script>
답변을 작성하려면 로그인이 필요합니다.
도와주세요 예를들어 네이버 앱에서 와플에듀 검색해서 클릭하면
팝업때문에 방해가됩니다.