找JS高人帮忙解释一下 一段10行左右的JS代码. 谢谢~
请高手帮忙解释一些这段JS代码:希望能够把
每一行都解释清楚点`` 谢谢了~
分不多 别嫌弃~ 谢谢``
JS:
function scrollToptj(){
var dstime;
var tjtop=parseInt($('#J_BnImgstj table').css('margin-top'));
if(Math.abs(tjtop)>32){
$('#J_BnImgstj tr:last').after('<tr>'+$('#J_BnImgstj tr:first').html()+'</tr>');$('#J_BnImgstj tr:first').remove();$('#J_BnImgstj table').css('margin-top','-1px');
}else{$('#J_BnImgstj table').css('margin-top',(tjtop-1)+'px');
}
dstime=setTimeout('scrollToptj()',50);
}
HTML:
<div class="erdengjiang" id="J_BnImgsyj">
<p class="jiangpin_dengji dengji_yb">二等奖中奖用户:<span>20名</span><em></em></p>
<!--列表-->
<div class="gundong_quyu">
<table border="0" cellspacing="0" cellpadding="0" width="100%" style="margin-top:0px;">
<tbody>
<tr><td><span class="zjry">王XX</span><span>手机号码:150****9040</span><span>菏泽市</span></td>
<td><span class="zjry">王XX</span><span>手机号码:150****9040</span><span>菏泽市</span></td>
<td><span class="zjry">王XX</span><span>手机号码:150****9040</span><span>菏泽市</span></td></tr>
<tr><td><span class="zjry">王XX</span><span>手机号码:150****9040</span><span>菏泽市</span></td>
<td><span class="zjry">王XX</span><span>手机号码:150****9040</span><span>菏泽市</span></td>
<td><span class="zjry">王XX</span><span>手机号码:150****9040</span><span>菏泽市</span></td></tr>
</tbody>
</table>
</div>
</div>