<table>
<tr>
<td onclick="this.style.backgroundColor= this.style.backgroundColor == 'red' ? '':'red';" ondblclick="window.location.href='http://www.csdn.net';">click here
</td>
</tr>
</table>
<tr>
<td onclick="this.style.backgroundColor= this.style.backgroundColor == 'red' ? '':'red';" ondblclick="window.location.href='http://www.csdn.net';">click here
</td>
</tr>
</table>
<script>
var activeRow=null
function foo(){
ob=window.event.srcElement;
if(ob!=activeRow){
if(activeRow!=null) activeRow.style.backgroundColor="";
ob.style.backgroundColor="red";
activeRow=ob;
}else{
activeRow=null;
ob.style.backgroundColor=""
}
}
</script>
<table>
<tr>
<td onclick="foo()" ondblclick="window.location.href='http://www.csdn.net';">click here
</td>
</tr>
<tr>
<td onclick="foo()" ondblclick="window.location.href='http://www.csdn.net';">click here
</td>
</tr>
</table>
现在有个 问题 ,我 的记录不是很多 ,基本上 最多情况下100条而已,我要做分页,就是每页显示八个纪录,我想只操纵数据库一次,读出所有纪录,然后让其他纪录disable,也就是只限是当前的8个纪录,点下一页就显示下面8个纪录,这个怎么实现?