areuin
新手上路

UID 69390
精华
0
积分 14
帖子 60
金钱 14 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2006-3-13
状态 离线
|
[推荐阅读] 超难解决的问题
JS部分
<SCRIPT LANGUAGE="JavaScript">
function scroll(n)
{temp=n;
Out1.scrollTop=Out1.scrollTop+temp;
if (temp==0) return;
setTimeout("scroll(temp)",80);
}
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
function scroll1(n)
{temp=n;
Out2.scrollTop=Out2.scrollTop+temp;
if (temp==0) return;
setTimeout("scroll1(temp)",80);
}
</SCRIPT>
页面部分
<TABLE WIDTH="98%">
<TR>
<TD VALIGN="TOP" ROWSPAN="2" ><DIV ID=Out1 STYLE="width:100%; height:220;overflow: hidden ;border-style:dashed;border-width: 1px,1px,1px,1px;">
<table width="98%" height="230" border="0" align="center" cellpadding="0" cellspacing="0">
<?
$filetype= mess;
$tiao = 1;
$query = "select * from efile where filetype='$filetype' order by createtime desc limit $tiao";
$result = mysql_query($query);
$thiscount=mysql_num_rows($result);
$i=0;
while($efile[$i]=mysql_fetch_array($result)):
?>
<tr>
<td valign="top"><span class="style1"> </span>
<div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<div align="left"><span class="style1">
<?
echo nl2br($efile[$i]["mess"]);
?>
</span>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
</div>
<div align="left"></div>
<div align="left"><span class="style1"> </span></div>
</div></td>
</tr>
<?
endwhile;
?>
</table>
<BR>
<BR>
</DIV></TD>
<TD WIDTH="14" VALIGN="TOP"><IMG SRC="image/up.gif" WIDTH="11" HEIGHT="10" onmouseover="scroll(-1)" onmouseout="scroll(0)" onmousedown="scroll(-3)" BORDER="0" ALT="按住可以加快浏览速度"></TD>
</TR>
<TR>
<TD WIDTH="14" VALIGN="BOTTOM"><IMG SRC="image/down.gif" onmouseover="scroll(1)" onmouseout="scroll(0)" onmousedown="scroll(3)" BORDER="0" WIDTH="11" HEIGHT="10" ALT="按住可以加快浏览速度"></TD>
</TR>
</TABLE>
可以实现上下滚动的.
|
|