Heim > Fragen und Antworten > Hauptteil
大家讲道理2017-04-17 16:13:52
https://github.com/FengShangW...
一个简单的登陆注册加聊天应用(node + express + mongodb),可以参考
ringa_lee2017-04-17 16:13:52
最简单的就是给 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>