마우스로 움직이는 레이어 팝업
페이지 정보
작성자 MintState 댓글 0건 조회 11,598회 작성일 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>
첨부파일을 확인하세요.
|
댓글목록
등록된 댓글이 없습니다.