月儿 发表于 2006-8-29 09:08:09

[08/29][傻兔教室] 圖片文字在版面上下移動

<TABLE background=http://i17.photobucket.com/albums/b51/lyh_/MATERIAL/bg/Full/75e322d8.jpg width=100% height=700 cellpadding=0 cellspacing=0 border=0><TBODY><TR><TD>
<BR><BR><P align=center><TEXTAREA rows=25 cols=100 border=4 bordercolor=purple><div id="point1" STYLE="position:absolute;visibility:visible;">
<table border="0" cellspacing="0" cellpadding="0" width=90% height=700>
<tr>
<td align=center>
<a href="http://bbs.xyhc.com/" TARGET="_BLANK">
<img border=0 src="http://i17.photobucket.com/albums/b51/lyh_/MATERIAL/TT/s-butterfly-11.gif" alt="希望大家喜歡!! ^^" width="150">
</a><br>

<font face="Helvetica" size="5" color="purple"><b>多<BR>謝<BR>支<BR>持<BR>優<BR>質<BR>美<BR>圖<BR>!</b></font><br>
</a>
</td>
</td>
</tr>
</table>
</div>

<script LANGUAGE="JavaScript1.2">
var XX=0; // X position of the scrolling objects
var xstep=移動速度, 可 (1-5) 隨意變動;
var delay_time=可隨意變動(一般為60);

//Begin of the unchangable area, please do not modify this area
var YY=0;
var ch=0;
var oh=0;
var yon=0;

var ns4=document.layers?1:0
var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0

if(ie){
YY=document.body.clientHeight;
point1.style.top=YY;
}
else if (ns4){
YY=window.innerHeight;
document.point1.pageY=YY;
document.point1.visibility="hidden";
}
else if (ns6){
YY=window.innerHeight
document.getElementById('point1').style.top=YY
}


function reloc1()
{

if(yon==0){YY=YY-xstep;}
else{YY=YY+xstep;}
if (ie){
ch=document.body.clientHeight;
oh=point1.offsetHeight;
}
else if (ns4){
ch=window.innerHeight;
oh=document.point1.clip.height;
}
else if (ns6){
ch=window.innerHeight
oh=document.getElementById("point1").offsetHeight
}
               
if(YY<0){yon=1;YY=0;}
if(YY>=(ch-oh)){yon=0;YY=(ch-oh);}
if(ie){
point1.style.left=XX;
point1.style.top=YY+document.body.scrollTop;
}
else if (ns4){
document.point1.pageX=XX;
document.point1.pageY=YY+window.pageYOffset;
}
else if (ns6){
document.getElementById("point1").style.left=XX
document.getElementById("point1").style.top=YY+window.pageYOffset
}

}

function onad()
{
if(ns4)
document.point1.visibility="visible";
loopfunc();
}
function loopfunc()
{
reloc1();
setTimeout('loopfunc()',delay_time);
}

if (ie||ns4||ns6)
window.onload=onad

</script></TEXTAREA></P><BR><BR></TD></TR></TBODY></TABLE>

<div id="point1" STYLE="position:absolute;visibility:visible;">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td align=center>
<a href="http://bbs.xyhc.com/" TARGET="_BLANK">
<img border=0 src="http://i17.photobucket.com/albums/b51/lyh_/MATERIAL/TT/s-butterfly-11.gif" alt="希望大家喜歡!! ^^" width="150">
</a><br>

<font face="Helvetica" size="5" color="purple"><b>多<BR>謝<BR>支<BR>持<BR>優<BR>質<BR>美<BR>圖<BR>!</b></font><br>
</a>
</td>
</td>
</tr>
</table>
</div>

<script LANGUAGE="JavaScript1.2">
var XX=0; // X position of the scrolling objects
var xstep=5;
var delay_time=60;

//Begin of the unchangable area, please do not modify this area
var YY=0;
var ch=0;
var oh=0;
var yon=0;

var ns4=document.layers?1:0
var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0

if(ie){
YY=document.body.clientHeight;
point1.style.top=YY;
}
else if (ns4){
YY=window.innerHeight;
document.point1.pageY=YY;
document.point1.visibility="hidden";
}
else if (ns6){
YY=window.innerHeight
document.getElementById('point1').style.top=YY
}


function reloc1()
{

if(yon==0){YY=YY-xstep;}
else{YY=YY+xstep;}
if (ie){
ch=document.body.clientHeight;
oh=point1.offsetHeight;
}
else if (ns4){
ch=window.innerHeight;
oh=document.point1.clip.height;
}
else if (ns6){
ch=window.innerHeight
oh=document.getElementById("point1").offsetHeight
}
               
if(YY<0){yon=1;YY=0;}
if(YY>=(ch-oh)){yon=0;YY=(ch-oh);}
if(ie){
point1.style.left=XX;
point1.style.top=YY+document.body.scrollTop;
}
else if (ns4){
document.point1.pageX=XX;
document.point1.pageY=YY+window.pageYOffset;
}
else if (ns6){
document.getElementById("point1").style.left=XX
document.getElementById("point1").style.top=YY+window.pageYOffset
}

}

function onad()
{
if(ns4)
document.point1.visibility="visible";
loopfunc();
}
function loopfunc()
{
reloc1();
setTimeout('loopfunc()',delay_time);
}

if (ie||ns4||ns6)
window.onload=onad

</script>

[ 本帖最后由 月儿 于 2006-8-29 09:32 编辑 ]

月儿 发表于 2006-8-29 09:35:12

<BR><BR><P align=center><FONT size=5 color=purple><BR>請大家嘗試點擊蝴蝶!! </B></FONT></P><BR><BR>

happy-yan 发表于 2006-8-29 16:33:19

这个学习中,不错的分享

lpjack 发表于 2006-9-28 15:13:39

看起来晕啊,学习一下

sjz1234 发表于 2006-9-29 17:04:41

<P>&nbsp;</P>
<DIV id=point1 style="VISIBILITY: visible; POSITION: absolute">
<TABLE height=700 cellSpacing=0 cellPadding=0 width="90%" border=0>
<TBODY>
<TR>
<TD align=middle><A href="http://www.xyhc.com/forumdisplay.php?fid=412&amp;page=1" target=_BLANK><IMG alt="希望大家喜歡!! ^^" src="http://i17.photobucket.com/albums/b51/lyh_/MATERIAL/TT/s-butterfly-11.gif" width=150 border=0> </A><BR><B><FONT color=purple size=5>学</FONT></B>
<P><B><FONT color=purple size=5>习</FONT></B></P>
<P><B><FONT color=purple size=5>学</FONT></B></P>
<P><B><FONT color=purple size=5>习</FONT></B></P>
<P><B><FONT color=purple size=5>看</FONT></B></P>
<P><B><FONT color=purple size=5>看</FONT></B></P>
<P><B><FONT color=purple size=5>做</FONT></B></P>
<P><B><FONT color=purple size=5>的</FONT></B></P>
<P><B><FONT color=purple size=5>对</FONT></B></P>
<P><B><FONT color=purple size=5>不</FONT></B></P>
<P><B><FONT color=purple size=5>对<BR></FONT><FONT face=Helvetica color=purple size=5>!</FONT></B><BR></P></TD></TR></TBODY></TABLE></DIV>
<SCRIPT language=JavaScript1.2>
var XX=0; // X position of the scrolling objects
var xstep=移動速度, 可 (1-5) 隨意變動;
var delay_time=可隨意變動(一般為60);

//Begin of the unchangable area, please do not modify this area
var YY=0;
var ch=0;
var oh=0;
var yon=0;

var ns4=document.layers?1:0
var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0

if(ie){
YY=document.body.clientHeight;
point1.style.top=YY;
}
else if (ns4){
YY=window.innerHeight;
document.point1.pageY=YY;
document.point1.visibility="hidden";
}
else if (ns6){
YY=window.innerHeight
document.getElementById('point1').style.top=YY
}


function reloc1()
{

if(yon==0){YY=YY-xstep;}
else{YY=YY+xstep;}
if (ie){
ch=document.body.clientHeight;
oh=point1.offsetHeight;
}
else if (ns4){
ch=window.innerHeight;
oh=document.point1.clip.height;
}
else if (ns6){
ch=window.innerHeight
oh=document.getElementById("point1").offsetHeight
}
               
if(YY<0){yon=1;YY=0;}
if(YY>=(ch-oh)){yon=0;YY=(ch-oh);}
if(ie){
point1.style.left=XX;
point1.style.top=YY+document.body.scrollTop;
}
else if (ns4){
document.point1.pageX=XX;
document.point1.pageY=YY+window.pageYOffset;
}
else if (ns6){
document.getElementById("point1").style.left=XX
document.getElementById("point1").style.top=YY+window.pageYOffset
}

}

function onad()
{
if(ns4)
document.point1.visibility="visible";
loopfunc();
}
function loopfunc()
{
reloc1();
setTimeout('loopfunc()',delay_time);
}

if (ie||ns4||ns6)
window.onload=onad

</SCRIPT>
页: [1]
查看完整版本: [08/29][傻兔教室] 圖片文字在版面上下移動