JS动态生成TR,TD分页
当前页只有:<inputtype="button"value="添加行"onclick="onchecks();"><tableid="tb"width="100%"bo...
当前页只有:
<input type="button" value="添加行" onclick="onchecks();">
<table id="tb" width="100%" border="1" cellspacing="0" cellpadding="1" style="filter:Alpha(opacity=65)">
</table>
我用JS动态生成tr和td
function onchecks(){
var tr1 = ids.insertRow();
var td1 = tr1.insertCell();
td1.width = "100px";
td1.align = "center";
td1.innerHTML="第一页";
var td2 = tr1.insertCell();
td2.width = "100px";
td2.innerHTML="第二页";
}
当多次点击“添加行”后就出现了表格,我想实现的效果就是当点击后出现分页效果,只要上一页下一页,高手来指点下,谢谢 展开
<input type="button" value="添加行" onclick="onchecks();">
<table id="tb" width="100%" border="1" cellspacing="0" cellpadding="1" style="filter:Alpha(opacity=65)">
</table>
我用JS动态生成tr和td
function onchecks(){
var tr1 = ids.insertRow();
var td1 = tr1.insertCell();
td1.width = "100px";
td1.align = "center";
td1.innerHTML="第一页";
var td2 = tr1.insertCell();
td2.width = "100px";
td2.innerHTML="第二页";
}
当多次点击“添加行”后就出现了表格,我想实现的效果就是当点击后出现分页效果,只要上一页下一页,高手来指点下,谢谢 展开
2个回答
展开全部
<input type="button" value="添加行" onclick="onchecks();">
<table id="tb" width="100%" border="1" cellspacing="0" cellpadding="1"
style="filter:Alpha(opacity=65)">
</table>
我用JS动态生成tr和td
<script>
function onchecks(){
var tr1 = document.getElementById("tb").insertRow();
var td1 = tr1.insertCell();
td1.width = "100px";
td1.align = "center";
td1.innerHTML="第一页";
var td2 = tr1.insertCell();
td2.width = "100px";
td2.innerHTML="第二页";
}
</script>
<table id="tb" width="100%" border="1" cellspacing="0" cellpadding="1"
style="filter:Alpha(opacity=65)">
</table>
我用JS动态生成tr和td
<script>
function onchecks(){
var tr1 = document.getElementById("tb").insertRow();
var td1 = tr1.insertCell();
td1.width = "100px";
td1.align = "center";
td1.innerHTML="第一页";
var td2 = tr1.insertCell();
td2.width = "100px";
td2.innerHTML="第二页";
}
</script>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询