뽀라닷컴
Loading...




웹디자인,포토샵,그누보드,제로보드,동영상제작 관련 메모 >>


전체(437)인터넷,컴퓨터 (94) | 웹디자인tip (182) | CG,그래픽tip (70) | BBS_Tip (74) | 영상tip (17) |
오늘 창 닫기 소스. 2008-04-27 15:44:14
홈페이지홈페이지

popup 을 띄울 메인페이지에 넣을 소스...


<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 "";
}
function Popup_Wnd(){
if(getCookie("Notice") != "no"){
var child = null;
child = window.open("http://팝업창 주소", "Notice",
"width=500,height=350,notoolbars,resizable=no,scrollbars=auto");
child.focus();
}
return;
}
Popup_Wnd();
-->
</script>
--------------------------------
메인페이지가 열릴 때 뜨는 팝업창에 넣을 소스



<script language="JavaScript">
<!--
function go(where){
window.opener.location.href=where
window.close()
}
function setCookie( name, value, expiredays )
{
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function closeWin()
{
if ( document.forms[0].Notice.checked )
setCookie( "Notice", "no" , 1);
self.close();
}
// -->
</script>

-------------------------------
팝업창 닫는 부분의 소스를 삽입

<FORM STYLE="margin:0; padding:0;">
<input type="checkbox" name="Notice" value="열지않음"> 오늘 하루동안 이창을 열지 않음 <a
href="#" onclick="closeWin();"> <font color="red"><b>[창닫기]</font></b></a>
</FORM>




    



목록보기 삭제하기