// Write JavaScript here
window.onload = function() {
tableEl = document.getElementById('tabelaDados');
btnAddLine = document.getElementById('btnAddLine');
btnAddLine.addEventListener('click', function(){
var tr = document.createElement('tr');
tr.innerHTML =
`
<td><button>-</button> 1 <button>+</button> </td>
<td>carro</td>
<td>R$ 55.000,00</td>
<td>R$ 55.000,00</td>
`
tableEl.appendChild(tr);
});
}
#tabelaHeader {
height: 50px;
width: 600px;
}
#tabelaDados {
position: relative;
height: 50;
width: 600px;
left: 60px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Usuários - Teste </title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" type="text/css" href="../css/estilo.css">
</head>
<body>
<div class="menu">
<button id="btnAddLine">Adicionar Produto</button>
</div>
<table id="tabelaHeader">
<thead>
<tr>
<th>Quantidade</th>
<th>Descrição</th>
<th>Valor Unitário</th>
<th>Valor Final</th>
</tr>
</thead>
</table>
<table id="tabelaDados">
<thead>
<tr>
<td><button>-</button>1 <button>+</button> </td>
<td>carro</td>
<td>R$ 55.000,00</td>
<td>R$ 55.000,00</td>
</tr>
</thead>
</table>
Se puderem dar uma olhada para me ajudar, agradeço! https://liveweave.com/X4Ut2B#&togetherjs=9kOOiC537z