Hi, I am new to HTML and I need to perform the following exercise: given the following code, I need to implement javascript to be able to add the data to the table. Also, when you add one, you can delete it. Finally, you must count the number of records
<!DOCTYPE html>
<html>
<head>
<title>
Laboratorio 1
</title>
<script src="https://code.jquery.com/jquery-1.11.3.js" type="text/javascript"></script>
<script src="insertar.js" type="text/javascript"></script>
</head>
<body>
<form>
<p>
<label>Entre su Nombre:</label> <br>
<input id="nombre" type="text" value="Nombre..."><br>
</p>
<p>
<label>Entre su Apellido:</label> <br>
<input id="apellido" type="text" value="Apellido..."><br>
</p>
<p>
<label>Entre su Cédula:</label> <br>
<input id="cedula" type="text" value="CI..."> <br>
</p>
<button id="adicionar" type="button">Adicionar a la tabla</button>
</form>
<p>Elementos en la Tabla: <div id="adicionados">0</div></p>
<table border="1">
<tr>
<th>Nobmre</th>
<th>Apellidos</th>
<th>Cédula</th>
<th>Eliminar</th>
</tr>
</table>
</body>
</html>
$(document).ready(function(){
$('#adicionar').click(funtion(){
entro
agregar();
});
});
var cont=0;
function agregar(){
var fila='<tr class="selected" id="fila'+cont+'"><td>'+cont+'</td><td>texto por defecto/td><td></td></tr>';
$('#adicionados').append(fila);
}