Copie o código do código da seguinte forma:
<!
<html>
<head>
<title> tabela1.html </title>
<meta http-equiv = "palavras-chave" content = "palavra-chave1, palavra-chave2, palavra-chave3">
<meta http-equiv = "description" content = "Esta é a minha página" >>
<meta http-equiv = "content-type" content = "text/html; charset = utf-8">
<!-<link rel = "stylesheet" type = "text/ css" href = "./ styles.css">->
<Script Language = "Javascript" type = "text/javascript">
<!-
Função test1 () {
// determinar se o número inserido existe
for (var i = 0; i <mytable.rows.length; i ++) {
var mais enerow = myTable.Rows [i];
if (enerow.cells [0] .innerText == No.Value) {
Window.alert ("Os números já existem!");
Retornar;
}
}
// Obtenha os dados no formulário
var newtableRow = mytable.insertrow (mytable.rows.length);
newtableRow.insertCell (0) .innerText = No.Value;
newtableRow.insertCell (1) .innerText = name1.value;
newtableRow.insertCell (2) .innerText = apelido.value;
}
Função test2 () {) {
myTable.Deleterow (mytable.rows.length-);
}
//->
</script>
</head>
<Body>
<H1> ranking heroes </h1>
<tabela id = "myTable" border = "1">
<tr> <td> ranking </td> <td> nome </td> <td> apelido </td> </tr>
<tr> <td> 1 </td> <td> música jiang </td> <td> chuva oportuna </td> </tr>
<tr> <td> 2 </td> <td> lu junyi </td> <td> yu qilin </td> </tr>
</tabela>
<H1> Por favor, digite o novo homem bom </h1>
Número <input id = "no" type = "text" value = ""> <br/> <br/>
Nome <input id = "name1" type = "text" value = ""> <br/>
Apelido <input id = "apelido" type = "text" value = ""> <br/>
<input id = "tianjia" type = "button" value = "add" onclick = "test1 ()">
<input type = "button" value = "exclua a última linha de" onclick = "test2 ()"/>/>
</body>
</html>