帮我指正一下怎么改才正确,就这么一点分了,感谢
var str = " </table> <div class=PageNext> </div> <table border=1> ";
var RowsCout = document.getElementById( "table1 ").rows.length;
for(var i=0;i <RowsCout;i++)
{
if(i%15==0){
document.getElementById( "table1 ").rows(i).insertAdjacentHTML( "beforeEnd ",str);
//上面插入时候错误,应该怎么写才正确
}
}
感谢
------解决方案--------------------先完全组装后再插入,别循环一段一段插入
------解决方案--------------------var RowsCout = document.getElementById( "table1 ").rows.length;
for(var i=0;i <RowsCout;i++)
{
if(i%15==0){
document.getElementById( "table1 ").rows(i).insertAdjacentHTML( "beforeEnd ",str);
}
RowsCout = document.getElementById( "table1 ").rows.length;
}