0
Hello, I’m a beginner in Django and JS. I’m having a lot of trouble importing an HTML table into an SQL database. has how to do this?
Would it be better to collect this data and import directly into html or better with a backend? If so, how would you do it?
<input type="text" placeholder="Digite para buscar" id="filtro_tabela"/>
<table id="tabela_dados">
<tr>
<th id ="nome" name="nome">Nome</th>
<th id ="idade name="idade"">idade</th>
<th id ="sexo" name="sexo"">sexo</th>
</tr>
<tr>
<td>Gian Nunes</td>
<td>29</td>
<td>Masculino</td>
</tr>
<tr>
<td>Gabriel Dionizio</td>
<td>25</td>
<td>Masculino</td>
</tr>
<tr>
<td>Júlia da Silva</td>
<td>24</td>
<td>Feminino</td>
</tr>
<tr>
<td>Rebeca da Silva</td>
<td>12</td>
<td>Feminino</td>
</tr>
<tr>
<td>Maria da Silva</td>
<td>12</td>
<td>Feminino</td>
</tr>
<tr>
<td>João da Silva</td>
<td>12</td>
<td>Feminino</td>
</tr>
</table>
The best would be to make a backend, where you can receive the data and do the Insert in the database. For this you have to call from the frontend with javascript or jquery and Ajax to the back
– osiris85
Okay. in this case how do I get JS to capture the fields of this table and perform an import? I’ve tried everything but never reach a conclusion.
– gcsilva. Neto 1234 estroncio