Русский
<!-- http://www.downcodes.com/js --> <!-- bbs http://www.downcodes.com/bbs--> <!-- Полный HTML-код выглядит следующим образом: > 1. Сначала вставьте следующий код между <head> и </head><br> <style type="text/css"> #floater {position: Absolute; left: 500; top: 146; 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; currentX = currentY = 0; WhichIt = null; LastScrollY = 0; NS = (document.layers) ? 0; IE = (document.all) ? 1: 0; <!-- КОД СТАЛКЕРА --> function heartBeat() { if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft } if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; } if(diffY != LastScrollY) { процент = .1 * (diffY - LastScrollY); if(percent > 0) процент = Math.ceil( процент ); else процент = Math.floor(percent); if(IE) document.all.floater.style.pixelTop += процент; if(NS) document.floater.top += процент; LastScrollY = LastScrollY + процент; (diffX != LastScrollX) { процент = .1 * (diffX - LastScrollX); if(percent > 0) процент = Math.ceil(percent); else процент = Math.floor(percent); if(IE) document all. .floater.style.pixelLeft += процент; if (NS) document.floater.left += процент; > функция checkFocus(x,y) { следить Stalkerx && x < (stalkerx+stalkerwidth)) && (y > Stalkery && y < (stalkery+stalkerheight))) return true; else return false } function GrabIt(e) { if(IE) { WhichIt = event.srcElement ; while (thatIt.id.indexOf("floater") == -1) { thatIt = thatIt.parentElement; if (whatIt == null) { return true; } } thatIt.style.pixelLeft = WhichIt.offsetLeft; .pixelTop = WhichIt.offsetTop; currentX = (event.clientX + document.body.scrollLeft); currentY = (event.clientY + document.body.scrollTop); } else { window.captureEvents(Event.MOUSEMOVE); (e.pageX,e.pageY)) { thatIt = document.floater; д) { if (whatIt == null) { return false } if(IE) { newX = (event.clientX + document.body.scrollLeft); newY = (event.clientY + document.body.scrollTop =); (newX - currentX); distanceY = (newY - currentY); currentX = newY; thatIt.style.pixelLeft += distanceX; thatIt.style.pixelTop += distanceY; if(whatIt.style.pixelTop < document . body.scrollTop) thatIt.style.pixelTop = document.body.scrollTop; if(thatIt.style.pixelLeft < document.body.scrollLeft) thatIt.style.pixelLeft = document.body.scrollLeft; if(thatIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - thatIt.style.pixelWidth - 20) thatIt.style.pixelLeft = document.body.offsetWidth - thatIt.style.pixelWidth - 20; if(whatIt.style.pixelTop > document . body.offsetHeight + document.body.scrollTop - thatIt.style.pixelHeight - 5) thatIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - thatIt.style.pixelHeight - 5; event.returnValue = false ; } else { WhichIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY); if(whatIt.left < 0+self.pageXOffset) thatIt.left = 0+self.pageXOffset; if(whatIt.top < 0 + self.pageYOffset) thatIt.top = 0+self.pageYOffset; if( (whatIt.left + thatIt.clip.width) >= (window.innerWidth+self.pageXOffset-17)) thatIt.left = ((window.nerWidth) +self.pageXOffset)-thatIt.clip.width)-17; if( (whatIt.top + thatIt.clip.height) >= (window.innerHeight+self.pageYOffset-17)) thatIt.top = ((window . InternalHeight+self.pageYOffset)-thatIt.clip.height)-17; return false; } function dropIt() { WhichIt = null; if(NS) window.releaseEvents (Event.MOUSEMOVE); <!-- КОД ПЕРЕТАЩИВАНИЯ --> if(NS) { window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN); window.onmousedown = captureIt; window.onmousemove = moveIt; window.onmouseup = dropIt } if( IE; ) { document.onmousedown = captureIt; document.onmousemove = moveIt; document.onmouseup = dropIt; } if(NS || IE) action = window.setInterval("heartBeat()",1); </script> <br > <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> > <br><br><br> <p><font color=red>//Пожалуйста, укажите источник для перепечатки: Академия создания сайтов. </font></p>