0
Some sites like the w3schools, when providing some code, keep the script on the same html code page.
How can I pass everything that is in the script below to my . jsp?
<div>
<div class="container">
<h2>Rubricas cadastradas</h2>
<input class="form-control" id="myInput" type="text" placeholder="Pesquisar...">
<table class="table table-sm">
<thead class="thead-dark">
<tr>
<th>Categoria</th>
<th>Rubrica</th>
<th>Valor</th>
<th>Excluir</th>
</tr>
</thead>
<tbody id="myTable">
<c:forEach items="${rubricas}" var="rubrica">
<tr>
<td> --- </td>
<td> ${rubrica.nome}</td>
<td> ${rubrica.getValorTotal()}</td>
<td style="width: 16%">
<form action="excluirProjeto" method="POST">
<input type="hidden" class="form-control" value="${projeto.id}" name="projeto_id">
<button type="submit" class="btn btn-link"> <img src="../img/excluir.png" alt="Logo" style="width:100%;"> </button>
</form>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
<script>
$(document).ready(function(){
$("#myInput").on("keyup", function() {
var value = $(this).val().toLowerCase();
$("#myTable tr").filter(function() {
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
});
});
</script>
A question just to make sure... jsp = ?
– brnTwp
@brnTwp jsp
– MarceloBoni
What I didn’t understand was the title of the question (How to pass the html script to css?), pass to . jsp or to css?
– MarceloBoni