想实现随网页滚动的效果,可是不动,帮忙看看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>{$title}</title>
<meta name="generator" content="{$generator}" />
<meta name="Keywords" content="{$keywords}" />
<</head>
<body>
<div class="all" >
<div class="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="19%"><span class="banner">{$showlogo(channelid,130,150)}</span></td>
<td width="81%" align="center"><span class="banner">{$showbanner(channelid,670,150)}</span></td>
</tr>
</table>
</div>
<div class="mid" style="background-image:{$csspicurl}backgrand.gif">
<table width="100%" height="55" border="0" cellpadding="0" cellspacing="0" class="hj1" >
<tr>
<td height="40" style="background-color:#ffa631" valign="right" valign="bottom"><span class="wm"> <a href="{$webdir}Photo/Index.asp">学校相册</a> </span><span class="wm"> <a href="{$webdir}GuestBook/Index.asp">留言平台</a> </span>
</td>
</tr>
<tr><td height="15"> </td></tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="120" valign="top" class="bj">
<div id=lovexin1 style='Z-INDEX: 10; POSITION: absolute; '>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="hj">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="3%"><img src="{$csspicurl}cd11.jpg" width="6" height="22" /></td>
<td width="97%" class="cdbg"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="bt2">
<tr>
<td width="75" align="left"><div >发布量情况</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td class="cdbk" ><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#ffc773" class="lrlb">
<div class="wz2">
{$channelcount(channelid)}
</div>
</td>
</tr>
</table></td>
</tr>
</table></div>
</td>
<td width="15"> </td>
<td width="560" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="hj">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1%"><img src="{$csspicurl}cd11.jpg" width="6" height="22" /></td>
<td width="99%" class="cdbg"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="bt3">
<tr>
<td width="520" height="22" align="left"><div class="btkz"> <a href="{$webdir}Star/ShowClass.asp?ClassID=19">本校之星</a></div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td class="cdbk"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#fffbf0" class="lrlb"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="36%" bgcolor="#fffbf0">
<div class="wz1">
<!--{$Showpicarticle(26,0,0,9,20,1,3,100,115,10,false,False)}-->
</div>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="hj">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1%"><img src="{$csspicurl}cd11.jpg" width="6" height="22" /></td>
<td width="99%" class="cdbg"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="bt3">
<tr>
<td width="520" height="22" align="left"><div class="btkz"> <a href="{$webdir}Article/ShowHot.asp">最新文章</a></div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td class="cdbk"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#fffbf0" class="lrlb"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="36%" bgcolor="#fffbf0">
<div class="wz1">
<!--{$ShowTopArticle(26,0,0,8,32,2,true,true,false)}--> </div>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="hj">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1%"><img src="{$csspicurl}cd11.jpg" width="6" height="22" /></td>
<td width="99%" class="cdbg"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="bt3">
<tr>
<td width="520" height="22" align="left"><div class="btkz"> 班级直通车</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td class="cdbk"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#fffbf0" class="lrlb"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="36%" bgcolor="#fffbf0">
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</td>
<td width="15"> </td>
<td width="120" valign="top" class="bj">
<div id=lovexin2 style='Z-INDEX: 10; POSITION: absolute; '>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="hj">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="3%"><img src="{$csspicurl}cd11.jpg" width="6" height="22" /></td>
<td width="97%" class="cdbg"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="bt2">
<tr>
<td width="75" align="left"><div >访问量情况</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td class="cdbk"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#ffc773" class="lrlb">
<div class="wz2">
<script type="text/javascript" src="{$webdir}Count.asp?style=product"></script> </div>
</td>
</tr>
</table></td>
</tr>
</table></div>
</td>
</tr>
</table>
</div>
<table width="100%"height="85"> <tr><td > </td></tr></table>
<div class="butten" style="background-color: #e7e3a6;">
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td width="1%"> </td>
<td width="98%" align="center" ><span class="wm">| <a onclick="this.style.behavior='url(#default#homepage)';this.setHomePage(' ');" href="#">设为首页</a> | <a target="_top" href="javascript:window.external.AddFavorite(' ','创力网站管理系统')">加入收藏</a> | <a href="{$webdir}user/login.asp">用户登陆</a> | <a href="{$webdir}Help.asp?Action=contact">联系我们</a> | </span></td>
<td width="1%"> </td>
</tr>
</table>
<div class="bq">
{$runtime}<br>
{$copyright}</div>
</div>
</div>
<SCRIPT LANGUAGE="JavaScript">
lastScrollY=0;
function heartBeat(){
diffY=document.body.scrollTop;
percent=.3*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.all.lovexin1.style.pixelTop+=percent;
document.all.lovexin2.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
function hide()
{
lovexin1.style.visibility="hidden";
lovexin2.style.visibility="hidden";
}
window.setInterval("heartBeat()",1);
</SCRIPT>
</body>
</html>
红色的代码是实现两联随网页滚动的代码,可是为什么不行呢?
[ 本帖最后由 yushan_0008 于 2009-9-17 16:35 编辑 ]