function test2(){
function test1(){
//判断插入的编号是否已经存在
for(var i=0;i
if(eachRow.cells[0].innerText == no.value){
window.alert("编号已经存在!");
return ;
}
}
//获取表单中的数据
var newTableRow = mytable.insertRow(mytable.rows.length);
newTableRow.insertCell(0).innerText = no.value;
newTableRow.insertCell(1).innerText = name1.value;
newTableRow.insertCell(2).innerText = nickName.value;
}
mytable.deleteRow(mytable.rows.length-1);
}
//-->
script>
英雄排行榜
排名 姓名 外号 1 宋江 及时雨 2 卢俊义 玉麒麟 请输入新的好汉
编号
名字
外号