Copier le code du code comme suit:
<!
<html>
<adal>
<Title> Table1.html </Title>
<meta http-equiv = "keywords" contenu = "keyword1, keyword2, keyword3">
<méta http-equiv = "Description" content = "Ceci est ma page" >>
<meta http-equiv = "contenu-type" contenu = "text / html; charset = utf-8">
<! - <link rel = "Stylesheet" type = "text / css" href = "./ styles.css"> ->
<script lingots = "javascript" type = "text / javascript">
<! -
Fonction test1 () {
// déterminer si le nombre inséré existe
for (var i = 0; i <myTable.Rows.length; i ++) {
var everyrow = myTable.Rows [i];
if (eachrow.cells [0] .InnerText == No.Value) {
Window.Alert ("Les nombres existent déjà!");
Retour;
}
}
// Obtenez les données dans le formulaire
var newtableRow = myTable.Insertrow (myTable.Rows.Length);
NewTableRow.InsertCell (0) .InnerText = No.Value;
NewTableRow.InsertCell (1) .InnerText = name1.Value;
newtableRow.InsertCell (2) .InnerText = Nonom.Value;
}
Fonction test2 () {) {
myTable.deleterOW (myTable.Rows.Length-);
}
// ->
</cript>
</ head>
<body>
<h1> Classement des héros </h1>
<table id = "mytable" border = "1">
<tr> <TD> CLASSAGE </TD> <TD> NOM </TD> <TD> POUR LE NOUVELLAGE </TD> </TR>
<tr> <td> 1 </td> <td> Song Jiang </td> <Td> Rayme rapide </td> </tr>
<tr> <td> 2 </td> <td> lu junyi </td> <td> yu qilin </td> </tr>
</ table>
<h1> Veuillez saisir le nouvel homme bon </h1>
Nombre <input id = "no" type = "text" value = ""> <br/> <br/>
Name <input id = "name1" type = "text" value = ""> <br/>
Surnom <input id = "nause" type = "text" value = ""> <br/>
<input id = "tianjia" type = "bouton" value = "add" onclick = "test1 ()">
<input type = "Button" value = "Supprimer la dernière ligne de" onclick = "test2 ()" /> />
</docy>
</html>