YesYo.com MintState Forums
뒤로    YesYo.com MintState BBS > Tech > Javascript
검색
멤버이름    오토
비밀번호 
 

마우스로 움직이는 레이어 팝업

페이지 정보

작성자 MintState 댓글 0건 조회 11,612회 작성일 08-11-17 11:59

본문

마우스로 움직이는 레이어 팝업

본문에 붙어서 뜨는 팝업입니다.
움직이는거 찾다가 신한홈페이지에서.. 찾았습니다.

정리 해 놓았으니 갔다가 붙여서 쓰세요..

Body.....
<DIV onselectstart="return false" id=popWindow style="Z-INDEX: 100; LEFT: 390px; WIDTH: 400px; POSITION: absolute; TOP: 135px">
<FORM name=layer_form><INPUT type=hidden value=nochecked name=Notice>
<table bordercolor=#88a5e1 cellSpacing=0 cellpadding=2 width=379 border=1>
	<tr bgcolor=#ffffff>
		<td width=379>
			<table cellSpacing=0 cellpadding=0 width=379 border=0>
				<colgroup>
				<col width=5>
				<col width=369>
				<col width=5>
				<tr>
					<td colspan=3><img src="./pop_out_top.gif" border=0></td>
				</tr>
				<tr>
					<td valign=top background=./pop_out_left.gif><img src="./pop_out_left.gif" border=0></td>
					<td>
						<table cellSpacing=0 cellpadding=0 width=369 border=0>
							<tr>
								<td>
									<table cellSpacing=0 cellpadding=0 width=369 border=0>
										<colgroup>
										<col width=7>
										<col width=355>
										<col width=7>
										<tr>
											<td bgcolor=#e6eef7 colspan=3 height=7></td></tr>
										<tr>
											<td width=7 bgcolor=#e6eef7></td>
											<td>
												<table cellSpacing=0 cellpadding=0 width=355 border=0>
													<tr class=vtop>
														<td align=middle>
															<table cellSpacing=0 cellpadding=0 border=0>
																<tr>
																	<td style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 3px; PADDING-TOP: 6px">
																		Memo<br />Memo<br />Memo<br />Memo<br />
																	</td>
																</tr>
															</table>
														</td>
													</tr>
												</table>
											</td>
											<td width=7 bgcolor=#e6eef7></td>
										</tr>
                    <tr>
											<td bgcolor=#e6eef7 colspan=3 height=5></td>
										</tr>
									</table>
								</td>
							</tr>
              <tr>
								<td align=right bgcolor=#e6eef7>
									<table cellSpacing=0 cellpadding=0 border=0>
										<tr>
											<td><A onfocus=blur(); href="javascript:isCheck('service_stop');"><img id=service_stop src="./pop_day_none.gif" border=0 name=service_stop></A></td>
                      <td><A href="javascript:notice_closeWin();"><img src="./pop_close.gif" border=0></A></td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
					<td valign=top align=right background=./pop_out_right.gif><img src="./pop_out_right.gif" border=0></td>
				</tr>
				<tr>
					<td colspan=3><img src="./pop_out_bottom.gif" border=0></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</FORM></DIV>
<SCRIPT language=JavaScript>
<!-- 
function notice_closeWin()
{
	if ( document.layer_form.Notice.value=="checked" )
		setCookies( "popup_layer1", "done" , 1); // 1=1day
	pop_win();
}

function pop_win(){
	if(document.all["popWindow"].style.display==""){
		document.all["popWindow"].style.display="none"
	}
}


// SET
function setCookies( name, value , expiredays )
{
 	var todayDate = new Date();
 	todayDate.setDate( todayDate.getDate() + expiredays );
 	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() +  ";"
}

// GET
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 "";
}


// =======================================
// do not edit anything below this line
// =======================================

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
  topDog=isIE ? "BODY" : "HTML";
  whichDog=isIE ? document.all.popWindow : document.getElementById("popWindow");
  hotdog=isIE ? event.srcElement : e.target;
  while (hotdog.id!="popWindow"&&hotdog.tagName!=topDog){
    hotdog=isIE ? hotdog.parentElement : hotdog.parentNode;
  }
  if (hotdog.id=="popWindow"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled=true;
    document.onmousemove=dd;
  }
}

function dd(e){
  if (!ddEnabled) return;
  whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
  whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");


function isCheck(name) {

  if(document.layer_form[name].value=='checked')
  {
   document.layer_form[name].value='nochecked';
   imgName=eval(name+"_no_check.src");
   document[name].src=imgName;
   document.layer_form.Notice.value = "nochecked";
  }
  else
  {
   document.layer_form[name].value='checked';
   imgName=eval(name+"_check.src");
   document[name].src=imgName;
   document.layer_form.Notice.value = "checked";
  }

}

if ( getCookie( "popup_layer1" ) == "done" ){	pop_win();}

service_stop_check = new Image;
service_stop_no_check = new Image;
service_stop_check.src= "./pop_day_check.gif";
service_stop_no_check.src= "./pop_day_none.gif";
// - JavaScript --->
</SCRIPT>


첨부파일을 확인하세요.
첨부 파일
파일 종류: rar layer_popup.rar (3.8K, 50 views)
파일 종류: gif popup.gif (16.5K, 2 views)
파일 종류: rar popup.rar (15.3K, 1 views)

댓글목록

등록된 댓글이 없습니다.

Total 179건 5 페이지
Javascript 목록
번호 제목 글쓴이 조회 날짜
99 MintState 9993 11-17
98 MintState 10974 11-17
97 MintState 14302 11-17
96 MintState 12772 11-17
95 MintState 12589 11-17
94 MintState 14346 11-17
93 MintState 11855 11-17
92 MintState 18472 11-17
91 MintState 9478 11-17
90 MintState 10373 11-17
89 MintState 11606 11-17
88 MintState 12176 11-17
87 MintState 11693 11-17
86 MintState 12369 11-17
85 MintState 13330 11-17
84 MintState 11343 11-17
83 MintState 12711 11-17
열람중 MintState 11613 11-17
81 MintState 13037 11-17
80 MintState 16361 11-17
게시물 검색
모바일 버전으로 보기
CopyRight ©2004 - 2024, YesYo.com MintState. ™