gpt4 book ai didi

javascript - jQuery 忽略响应

转载 作者:行者123 更新时间:2023-11-28 03:01:05 25 4
gpt4 key购买 nike

大家好,有人知道为什么我的提醒不起作用吗?

<script type="text/javascript">
function SubmitForm(method) {
var login = document.form.login.value;
var password = document.form.password.value;
$.post("backend.php", {
login: login,
password: password,
method: method},
function(data){
alert(data.message);
console.log(data.refresh);
}, "json");
}
</script>

backend.php 的响应是

backend{"message":"Log in credentials are not correct","refresh":"false"}

最佳答案

为什么您的回复开头是“后端”?我首先要删除它。从 { 到 } 的所有内容看起来都不错。

关于javascript - jQuery 忽略响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/871260/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com