العربية
<STYLE type=text/css>#floater { Z-INDEX: 10; اليسار: 500 بكسل؛ الرؤية: مرئية؛ العرض: 125 بكسل؛ الموقف: مطلق؛ الأعلى: 146 بكسل } </STYLE> <STYLE type=text/css> TD { FONT-SIZE: 9pt; ارتفاع الخط: 11pt } </STYLE> </HEAD> <BODY > <DIV id=floater style="LEFT: 0px; WIDTH: 89px; TOP: 137px; HEIGHT: 40px"> <TABLE cellSpacing=0 cellPadding=0 width=75 bgColor=#0000ff border=1> <TR> <TD width=10><B><IMG id=fpAnimswapImgFP1 height=200 width=200 lowsrc=/img/200406301.jpg border=0 name=fpAnimswapImgFP1dynamicanimation= "fpAnimswapImgFP1"></B></TD> <TD align=middle width=30>网页<BR>教学</TD></TR> </TABLE> </DIV> <SCRIPT language=JavaScript> self. onError=null; currentX = currentY = 0; thisIt = null; lastScrollX = 0; lastScrollY = 0; NS = (document.layers)؟ 1 : 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); إذا (نسبة مئوية > 0) نسبة مئوية = Math.ceil(نسبة مئوية)؛ نسبة أخرى = Math.floor(percent); if(IE) document.all.floater.style.pixelTop += بالمائة; if(NS) document.floater.top += بالمائة; lastScrollY = lastScrollY + بالمائة؛ } if(diffX != lastScrollX) { بالمائة = .1 * (diffX - lastScrollX); إذا (نسبة مئوية > 0) نسبة مئوية = Math.ceil(نسبة مئوية)؛ نسبة أخرى = Math.floor(percent); if(IE) document.all.floater.style.pixelLeft += بالمائة; if(NS) document.floater.left += بالمائة؛ lastScrollX = lastScrollX + بالمائة؛ } } <!-- /رمز STALKER --> <!-- رمز السحب والإسقاط --> function checkFocus(x,y) { stalkerx = document.floater.pageX; stalkery = document.floater.pageY; stalkerwidth = document.floater.clip.width; stalkerheight = document.floater.clip.height; if( (x > stalkerx && x < (stalkerx+stalkerwidth)) && (y > stalkery && y < (stalkery+stalkerheight))) return true; وإلا يعود كاذبا؛ } وظيفة GrabIt(e) { if(IE) { itIt = events.srcElement; while (whatIt.id.indexOf("floater") == -1) { whoIt = thatIt.parentElement; if (whatIt == null) { return true; } } thatIt.style.pixelLeft = thatIt.offsetLeft; thatIt.style.pixelTop = thatIt.offsetTop; currentX = (event.clientX + document.body.scrollLeft); currentY = (event.clientY + document.body.scrollTop); } else { window.captureEvents(Event.MOUSEMOVE); if(checkFocus (e.pageX,e.pageY)) { thatIt = document.floater; StalkerTouchedX = e.pageX-document.floater.pageX; StalkerTouchedY = e.pageY-document.floater.pageY; } } إرجاع صحيح؛ } دالة moveIt(e) { if (whatIt == null) { return false; } if(IE) { newX = (event.clientX + document.body.scrollLeft); newY = (event.clientY + document.body.scrollTop); distanceX = (newX -currentX); distanceY = (newY -currentY); currentX = newX; currentY = newY; thatIt.style.pixelLeft += distanceX; thatIt.style.pixelTop += distanceY; if(whatIt.style.pixelTop < document.body.scrollTop) thatIt.style.pixelTop = document.body.scrollTop; if(whatIt.style.pixelLeft < document.body.scrollLeft) thatIt.style.pixelLeft = document.body.scrollLeft; if(whatIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - thatIt.style.pixelWidth - 20) whoIt.style.pixelLeft = document.body.offsetWidth - whoIt.style.pixelWidth - 20؛ if(whatIt.style.pixelTop > document.body.offsetHeight + document.body.scrollTop - whoIt.style.pixelHeight - 5) whoIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whoIt.style. ارتفاع البكسل - 5؛ Event.returnValue = false; } else { whoIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY); if(whatIt.left < 0+self.pageXOffset) whoIt.left = 0+self.pageXOffset; if(whatIt.top < 0+self.pageYOffset) whoIt.top = 0+self.pageYOffset; إذا( (whatIt.left + whoIt.clip.width) >= (window.innerWidth+self.pageXOffset-17)) whoIt.left = ((window.innerWidth+self.pageXOffset)-whatIt.clip.width)-17 ; إذا( (whatIt.top + whoIt.clip.height) >= (window.innerHeight+self.pageYOffset-17)) whoIt.top = ((window.innerHeight+self.pageYOffset)-whatIt.clip.height)-17 ; عودة كاذبة. } إرجاع خطأ؛ } // المزيد من جافا سكريبت من http://www.downcodes.com function dropIt() { thatIt = null; إذا (NS) window.releaseEvents (Event.MOUSEMOVE)؛ عودة صحيحة؛ } <!-- اسحب كود السحب --> if(NS) { window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN); window.onmousedown = GrabIt; window.onmousemove = moveIt; window.onmouseup = dropIt; } if(IE) { document.onmousedown = GrabIt; document.onmousemove = moveIt; document.onmouseup = dropIt; } if(NS || IE) action = window.setInterval("heartBeat()",1); </SCRIPT> <br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br >e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e <br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br >e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e <br>e <br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br >e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e<br>e </BODY></HTML>