Path:
Home
/
Home Page
/
Beispiele
/ Java-Script
Scrollendes Bild / Text:
SCROLL HOCH
SCROLL RUNTER
Und Text hier!!!
Quelltext
<HTML> <HEAD> <TITLE></TITLE> <SCRIPT language=JavaScript1.2> //Kontrolle Browser IE oder NN ie=document.all?1:0 n=document.layers?1:0 //Timeout beim Scrollen Geschw=50 //Höhe des Fensters HoeheFenster=75 function Scroll_Container_erzeugen(Objekt,Formatierung){ Formatierung=(!Formatierung) ? '':'document.'+Formatierung+'.' this.css=(n) ? eval(Formatierung+'document.'+Objekt):eval('document.all.'+Objekt+'.style') this.ScrollenHeight=n?this.css.document.height:eval('document.all.'+Objekt+'.offsetHeight') this.top=Spitze_ermitteln return this } function Spitze_ermitteln(){ var Spitze_links=(n) ? eval(this.css.top):eval(this.css.pixelTop); return Spitze_links; } var ScrollenTim; var akt_Punkt=0; function Scrollen(Geschw_Scrollen){ clearTimeout(ScrollenTim) Scroll_Richtung=Geschw_Scrollen>0?1:0 if((!Scroll_Richtung && Scroll_Container[akt_Punkt].top()>-Scroll_Container[akt_Punkt].ScrollenHeight+HoeheFenster) || (Scroll_Container[akt_Punkt].top()<0 && Scroll_Richtung)){ Scroll_Container[akt_Punkt].css.top=Scroll_Container[akt_Punkt].top()+Geschw_Scrollen ScrollenTim=setTimeout("Scrollen("+Geschw_Scrollen+")",Geschw) } } function Scrollen_aus(){ clearTimeout(ScrollenTim) } function akt_Punkt_Aendern(num){ akt_Punkt=num Scroll_Container[akt_Punkt].css.visibility='hidden' Scroll_Container[akt_Punkt].css.top=0 Scroll_Container[akt_Punkt].css.visibility='visible' } function initialisierung(){ Scroll_Container=new Array() Scroll_Container[0]=new Scroll_Container_erzeugen('Scroll_Abschn_1','Format_Container_2') Scroll_Container[0].css.visibility='visible' } onload=initialisierung; //--> </SCRIPT> <STYLE> #Format_Container { LEFT: 20%; POSITION: absolute; TOP: 80px; WIDTH: 200px} #Format_Container_2 { CLIP: rect(0px 250px 150px 0px); HEIGHT: 150px; LEFT: 35%; POSITION: absolute; TOP: 80px; WIDTH: 250px} .Scroll_Class { LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: hidden} </STYLE> </HEAD> <BODY> <DIV id=Format_Container> <A href="listing3.htm#" onmouseout=Scrollen_aus() onmouseover=Scrollen(5)>HOCH</A> <br> <br> <A href="listing3.htm#" onmouseout=Scrollen_aus() onmouseover=Scrollen(-5)>RUNTER</A> </DIV> <DIV id=Format_Container_2> <DIV class=Scroll_Class id=Scroll_Abschn_1> <img src="1.jpg" width="244" height="696"> <br><br>Und Text hier!!! </DIV> </DIV> </BODY>
Webmaster >>
bis0uhr@gmx.at