springboot怎么把数据传给前端:springboot 如何引入前端 bootstrap?
这种问题网上一搜一大堆,你可以具体找一篇文章试试,遇到问题可以针对相关问题去提问。springboot通过jar包方式引入bootstrap_个人文章 - SegmentFault 思否 这不是查查就
顺晟科技
2022-10-19 14:40:25
91
我希望能够删除选定的SQL记录。
如果单击记录旁边的按钮,将弹出一个屏幕,显示“您真的要删除它吗?”
如果单击是,则
单击的按钮旁边的SQL记录将从表中删除。
我真的被困在这里,即使是一点点帮助也会有帮助。
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>selectToDelete</title>
</head>
<body >
<table border="1">
<tr>
<td>name</td>
<td>id</td>
<td>price</td>
</tr>
<tr>
th:each="i : ${#numbers.sequence(session.sessionInfo.input,session.sessionInfo.input2)}">
<td th:text="${session.session2.goodsList[i].G_name}">
<td th:text="${session.session2.goodsList[i].G_id}">
<td th:text="${session.session2.goodsList[i].G_price}">
<td > <button type="submit" name="deleteParam" th:value="${i}" onclick="DeleteButton1(this.value)">selectButton</button></td>
</tr>
</table>
<script th:inline="javascript">
function DeleteButton1(e) {
if (confirm("Do you want to Delete?")) {
window.open('deleteScreen', '_self' );
}else{
console.log(e)
}
}
</script>
</html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>selectToDelete</title>
</head>
<body >
<table border="1">
<tr>
<td>name</td>
<td>id</td>
<td>price</td>
</tr>
<tr>
th:each="i : ${#numbers.sequence(session.sessionInfo.input,session.sessionInfo.input2)}">
<td th:text="${session.session2.goodsList[i].G_name}">
<td th:text="${session.session2.goodsList[i].G_id}">
<td th:text="${session.session2.goodsList[i].G_price}">
<td > <button type="submit" name="deleteParam" th:value="${i}" onclick="DeleteButton1(this.value)">selectButton</button></td>
</tr>
</table>
<script th:inline="javascript">
function DeleteButton1(e) {
if (confirm("Do you want to Delete?")) {
window.open('deleteScreen', '_self' );
}else{
console.log(e)
}
}
</script>
</html>
存储库↓
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>selectToDelete</title>
</head>
<body >
<table border="1">
<tr>
<td>name</td>
<td>id</td>
<td>price</td>
</tr>
<tr>
th:each="i : ${#numbers.sequence(session.sessionInfo.input,session.sessionInfo.input2)}">
<td th:text="${session.session2.goodsList[i].G_name}">
<td th:text="${session.session2.goodsList[i].G_id}">
<td th:text="${session.session2.goodsList[i].G_price}">
<td > <button type="submit" name="deleteParam" th:value="${i}" onclick="DeleteButton1(this.value)">selectButton</button></td>
</tr>
</table>
<script th:inline="javascript">
function DeleteButton1(e) {
if (confirm("Do you want to Delete?")) {
window.open('deleteScreen', '_self' );
}else{
console.log(e)
}
}
</script>
</html>
服务↓
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>selectToDelete</title>
</head>
<body >
<table border="1">
<tr>
<td>name</td>
<td>id</td>
<td>price</td>
</tr>
<tr>
th:each="i : ${#numbers.sequence(session.sessionInfo.input,session.sessionInfo.input2)}">
<td th:text="${session.session2.goodsList[i].G_name}">
<td th:text="${session.session2.goodsList[i].G_id}">
<td th:text="${session.session2.goodsList[i].G_price}">
<td > <button type="submit" name="deleteParam" th:value="${i}" onclick="DeleteButton1(this.value)">selectButton</button></td>
</tr>
</table>
<script th:inline="javascript">
function DeleteButton1(e) {
if (confirm("Do you want to Delete?")) {
window.open('deleteScreen', '_self' );
}else{
console.log(e)
}
}
</script>
</html>
SQL文件↓
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>selectToDelete</title>
</head>
<body >
<table border="1">
<tr>
<td>name</td>
<td>id</td>
<td>price</td>
</tr>
<tr>
th:each="i : ${#numbers.sequence(session.sessionInfo.input,session.sessionInfo.input2)}">
<td th:text="${session.session2.goodsList[i].G_name}">
<td th:text="${session.session2.goodsList[i].G_id}">
<td th:text="${session.session2.goodsList[i].G_price}">
<td > <button type="submit" name="deleteParam" th:value="${i}" onclick="DeleteButton1(this.value)">selectButton</button></td>
</tr>
</table>
<script th:inline="javascript">
function DeleteButton1(e) {
if (confirm("Do you want to Delete?")) {
window.open('deleteScreen', '_self' );
}else{
console.log(e)
}
}
</script>
</html>
顺晟科技:
05
2022-12
02
2022-12
02
2022-12
29
2022-11
29
2022-11
24
2022-11