CODE (html):
скопировать код в буфер обмена
скопировать код в буфер обмена
- <html>
- <head>
- <title>....Просмотр java-скрипта....</title>
- <STYLE TYPE="text/css">
- <!--
- A { font-family: Arial,Helvetica,sans-serif; color: #0000FF;text-decoration:underline}
- A:visited { font-family: Arial,Helvetica,sans-serif; color: #0000FF}
- A:hover { font-family: Arial,Helvetica,sans-serif; color: #0000FF}
- -->
- </STYLE>
- <script>
- <!--
- var x,y
- var marginbottom
- var marginleft=0
- var margintop=0
- var marginright
- var cliptop
- var clipbottom
- var clipleft
- var clipright
- var clippoints
- var ballheight=100
- var ballwidth=100
- var imageheight=280
- var imagewidth=580
- // less is faster
- var tempo=25
- // horizontal move (pixels) within time unit
- var stepx=12
- // vertical move (pixels) within time unit
- var stepy=6
- var timer
- // check the width and the height of the document
- // gets the starting position of the ball by random
- function setValues() {
- if (document.all) {
- marginbottom = imageheight-ballheight
- marginright = imagewidth-ballwidth
- document.all.ball.style.posLeft=randommaker(400)
- document.all.ball.style.posTop=0
- document.all.textcontent.style.posLeft=0
- document.all.textcontent.style.posTop=0
- document.all.ball.style.filter="alpha(opacity=0,finishopacity=100,style=2,startX=0px,startY=0px,finishX=100px,finishY=100px)"
- moveball()
- }
- }
- // randomfunction
- function randommaker(range) {
- rand=Math.floor(range*Math.random())
- return rand
- }
- function moveball() {
- checkposition()
- if (document.all) {
- document.all.ball.style.posLeft+=stepx
- document.all.ball.style.posTop+=stepy
- cliptop=document.all.ball.style.posTop
- clipbottom=cliptop+ballheight
- clipleft=document.all.ball.style.posLeft
- clipright=clipleft+ballwidth
- clippoints="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
- document.all.textcontent.style.clip=clippoints
- timer=setTimeout("moveball()",tempo)
- }
- }
- function checkposition() {
- if (document.all) {
- if (document.all.ball.style.posLeft>=marginright) {
- stepx=stepx*-1
- document.all.ball.style.posLeft-=10
- }
- if (document.all.ball.style.posLeft<=marginleft) {
- stepx=stepx*-1
- document.all.ball.style.posLeft+=10
- }
- if (document.all.ball.style.posTop>=marginbottom) {
- stepy=stepy*-1
- document.all.ball.style.posTop-=10
- }
- if (document.all.ball.style.posTop<=margintop) {
- stepy=stepy*-1
- document.all.ball.style.posTop+=10
- }
- }
- }
- // - End of JavaScript - -->
- </script>
- </head>
- <body bgColor=#eee1bc link="#008000" onLoad="setValues()">
- <p align="center">
- <p></p>
- <DIV id="textcontent" style="position: absolute; top:-5000px; left:-5000px"><img src="zeta0212.gif" border="0"></DIV>
- <DIV id="ball" style="position:absolute; top:-50px; width:100px;height:100px;background-color:weat;"></DIV>
- <P><FONT size=1>
- <SCRIPT
- language=JavaScript><!--
- function closeIt() {
- close();
- }
- // -->
- </SCRIPT>
- </FONT></P>
- <FONT size=1><FORM>
- <p align="center"><INPUT onclick=closeIt() type=button value=Закрыть!>
- </FORM></FONT>
- </body>
- </html>