Deutsch
<HTML> <HEAD> <META http-equiv='Content-Type' content='text/html'> <TITLE>Eine mit der Maus verschiebbare Ebene wird auf der Seite mit einer Schaltfläche zum Schließen angezeigt, cooler Effekt</; TITEL> </HEAD> <STYLE type=text/css> #floater { LINKS: 400px; SICHTBARKEIT: sichtbar; 100px; <DIV align=center id=floater style="HEIGHT: 98px; WIDTH: 240px;"> <TABLE bgColor=#deefef border=1 borderColor=#008000 borderColorDark=#00ff00 borderColorLight=#ff00ff cellPadding=2 cellSpacing =1 width= "240"> <TBODY> <TR> <TD width="100%"> <P align=center>Willkommen in der Website Building Academy<BR>JavaScript-Kolumne! </P></TD></TR> <TR> <TD width="100%"> Willkommen bei der Website Building Academy. Wenn Sie Kommentare und Vorschläge haben, können Sie diese gerne mitteilen Wir werden unser Bestes geben, um Ihnen zu dienen. Bitte unterstützen Sie unsere Arbeit. Jeder Schritt unseres Wachstums wird Ihre Spuren hinterlassen. ! ! <BR> Wenn Sie gute Vorschläge und Meinungen haben, können Sie mir schreiben. Wenn Sie gute Beispiele haben, hoffe ich, Sie zu konsultieren und von Ihnen zu lernen. </TD></TR></TBODY></TABLE></DIV> <SCRIPT language=JavaScript> self.onError=null; whichIt = null; lastScrollY = 0; NS = (document.layers) ? 1 : 0; IE = (document.all) ? <!-- STALKER CODE --> function heartBeat() { if(IE) { diffY = document.body.scrollTop ; diffX = document.body.scrollLeft; } if(NS) { diffX = self.pageXOffset } if(diffY != lastScrollY) { dependY - lastScrollY); > 0) Prozent = Math.ceil(Prozent); sonst Prozent = Math.floor(Prozent); if(IE) document.all.floater.style.pixelTop += Prozent; Prozent; LastScrollY = LastScrollY + Prozent; Prozent); if(IE) document.all.floater.style.pixelLeft += Prozent; if(NS) document.floater.left += Prozent; } } <!-- /STALKER CODE -- > <!-- DRAG DROP CODE --> function checkFocus(x,y) { stalkerx = document.floater.pageX; stalkerwidth = document.floater.clip.width; .clip.height; if( (x > stalkerx && x < (stalkerx+stalkerwidth)) && (y > stalkery && y < (stalkerheight))) return true; (IE) { whichIt = event.srcElement; while (whichIt.id.indexOf("floater") == -1) { whichIt = whichIt.parentElement; if (whichIt == null) { return true; .pixelLeft = whichIt.offsetLeft; WhichIt.offsetTop; currentX = (event.clientX + document.body.scrollTop); currentY = (event.clientY + document.body.scrollTop); captureEvents(Event.MOUSEMOVE); if(checkFocus (e.pageX,e.pageY)) { whichIt = document.floater; StalkerTouchedY = e.pageY-document.floater.pageY ; } } return true; } function moveIt(e) { if (whichIt == null) { return false } if(IE) { newX = (event.clientX + document.body.scrollLeft); + document.body.scrollTop); distanceY = (newY - currentY); whichIt.style.pixelTop += distanceY; if(whichIt.style.pixelTop < document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop; if(whichIt.style.pixelLeft < document.body.scrollLeft) whichIt.style.pixelLeft = document.body. scrollLeft; if(whichIt.style.pixelLeft > 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;} return false } function dropIt() { whichIt = null; if(NS) window.releaseEvents (Event.MOUSEMOVE); return true; window.onmouseup = dropIt; } if(IE) { document.onmousedown = grabIt; document.onmouseup = moveIt; } if(NS || IE) action = window.setInterval("heartBeat()", 1); </SCRIPT> </BODY></HTML>