한국어
<!-- http://www.downcodes.com/js --> <!-- bbs http://www.downcodes.com/bbs--> <!-- 전체 HTML 코드는 다음과 같습니다 -- > 1. 먼저 <head>와 </head><br> <style type="text/css"> #floater { position: 절대: 500; width: 176; : visible; z-index: 10; } --> </style> <br> <br> 2. 본문의 아무 곳에나 다음 코드를 삽입합니다. <div ID="floater" style="left: 590px; top: 158px "> <p align="center"> <img src="/img/200406301.jpg" width="127" height="150"><br> <font color="#FF8040">환영합니다</font > </p> </div><script LANGUAGE="JavaScript"> self.onError=null; whichIt = null; lastScrollY = 0; 0; IE = (document.all) ? 1: 0; <!-- 스토커 코드 -> function heartBeat() { diffY = document.body.scrollTop } if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; } if(diffY != lastScrollY) { 퍼센트 = .1 * (diffY - lastScrollY) 백분율 = Math.ceil( 퍼센트 ); else Percent = Math.floater.style.pixelTop += 퍼센트; if(NS) document.floater.top += 퍼센트; lastScrollY = 퍼센트; (diffX != lastScrollX) { 퍼센트 = .1 * (diffX - lastScrollX); if(percent > 0) 퍼센트 = Math.ceil(percent); else 퍼센트 = Math.floor(percent); .floater.style.pixelLeft += 퍼센트; if(NS) document.floater.left += 퍼센트; lastScrollX = lastScrollX + 퍼센트 } } <!-- /STALKER CODE --> <!-- 드래그 드롭 코드 - - > 함수 checkFocus(x,y) { 스토커리 = document.floater.pageY; 스토커 높이 = document.floater.clip.height; 스토커x && x < (stalkerx+stalkerwidth)) && (y > 스토커리 && y < (stalkery+stalkerheight))) return true; else return false } function GrabIt(e) { whichIt = event.srcElement ; while (whichIt.id.indexOf("floater") == -1) { whichIt = whichIt.parentElement; if (whichIt == null) { return true; } } whichIt.style.pixelLeft = whichIt.offsetLeft; .pixelTop = whichIt.offsetTop; currentX = (event.clientX + document.body.scrollTop); currentY = (event.clientY + document.body.scrollTop) } else { window.captureEvents(Event.MOUSEMOVE); (e.pageX,e.pageY)) { whichIt = document.floater; e.pageX-document.floater.pageX; StalkerTouchedY = e.pageY-document.floater.pageY } } return true; e) { if (whichIt == null) { return false; } if(IE) { newX = (event.clientX + document.body.scrollLeft); newY = (event.clientY + document.body.scrollTop); (newX - currentX); distanceY = (newY - currentY); currentY = newY; whichIt.style.pixelTop += distanceY; body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop; if(whichIt.style.pixelLeft < document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft > document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20; if(whichIt.style.pixelTop > document . body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5 event.returnValue = false ; } else { whichIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY); if(whichIt.left < 0+self.pageXOffset) whichIt.left = 0+self.pageXOffset; if(whichIt.top < 0 + self.pageYOffset) whichIt.top = 0+self.pageYOffset; if( (whichIt.left + whichIt.clip.width) >= (window.innerWidth+self.pageXOffset-17)) whichIt.left = ((window.innerWidth +self.pageXOffset)-whichIt.clip.width)-17; if( (whichIt.top + whichIt.clip.height) >= (window.innerHeight+self.pageYOffset-17)) whichIt.top = ((window . innerHeight+self.pageYOffset)-whichIt.clip.height)-17; return false; } function dropIt() { if(NS) window.releaseEvents(Event.MOUSEMOVE); <!-- 드래그 드롭 코드 --> if(NS) { window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN); window.onmousedown = GrabIt; window.onmouseup = dropIt } if( IE ) { document.onmousedown = GrabIt; document.onmouseup = dropIt; } if(NS || IE) action = window.setInterval("heartBeat()",1); <br><br><br><br><br><br><br><br><br><br><br><br><br><br > <br><br><br> <p><글꼴 색상=빨간색>//재인쇄할 경우 출처를 명시해 주세요: 웹사이트 구축 아카데미. </font></p>