springboot怎么把数据传给前端:springboot 如何引入前端 bootstrap?
这种问题网上一搜一大堆,你可以具体找一篇文章试试,遇到问题可以针对相关问题去提问。springboot通过jar包方式引入bootstrap_个人文章 - SegmentFault 思否 这不是查查就
顺晟科技
2022-10-19 11:33:36
108
我试过不同的方法,但都不起作用。每次我按下按钮,页面就会重新加载。您应该按submit按钮,然后页面显示“祝贺”,然后提供更多信息。
顺晟科技:
<form>
<label>Username:</label>
<input type="text">
<br><br>
<label>Password:</label>
<input type="password">
<br><br>
<!-- <button onclick="goToGallery()">Submit</button> -->
<!-- <a href="https://replit.com/@NicoDisara/Final-Project#newPage.html">
<button>Submit</button>
</a> -->
<!-- <form action="newPage.html">
<input type="Submit"/>
</form> -->
<button onclick="onClick()">Submit</button>
<script>
function onClick() {
document.location.href = "newPage.html";
}
</script>
</form>
在javascript函数中被替换为to。我相信它会很好地工作。
试试这个
<form>
<label>Username:</label>
<input type="text">
<br><br>
<label>Password:</label>
<input type="password">
<br><br>
<!-- <button onclick="goToGallery()">Submit</button> -->
<!-- <a href="https://replit.com/@NicoDisara/Final-Project#newPage.html">
<button>Submit</button>
</a> -->
<!-- <form action="newPage.html">
<input type="Submit"/>
</form> -->
<button onclick="onClick()">Submit</button>
<script>
function onClick() {
document.location.href = "newPage.html";
}
</script>
</form>
我在这里做了什么?
我将操作添加到窗体中,并将类型更改为submit of Button
弹出某种对话框,向用户显示一条消息,然后进入一个新页面应该相当简单。
05
2022-12
02
2022-12
02
2022-12
29
2022-11
29
2022-11
24
2022-11