node.js+express 怎么在路由中刷新当前页
1个回答
展开全部
最简单的就是给 form 增加 onsubmit 参数,异步提交
<script>
function PostData() {
$.ajax({
type: "POST",
url: "post.go",
data : "",
success: function(msg) {
}
});
return false;
}
</script>
<form onsubmit="return PostData()">
<input type="text" value="">
<input type="submit">
</form>
<script>
function PostData() {
$.ajax({
type: "POST",
url: "post.go",
data : "",
success: function(msg) {
}
});
return false;
}
</script>
<form onsubmit="return PostData()">
<input type="text" value="">
<input type="submit">
</form>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询