![](/img/trans.png)
[英]jQuery keyup function stops working when trying to insert into a database
[英]jquery stops insert into database
在进行插入的if语句中,您正在检查opret
但是输入中的id为opret_besked
,其中名称为opret
。 使用输入时,id会覆盖名称。 因此,将您的IF语句中的名称更改为opret_besked
,一切正常。
像这样:
var opretform = $("#opret_besked").val;
$.ajax({
type: "POST",
url: "tagwall.php",
data: "opret_besked=" + opret_besked,
success: function(response) {
if(response == 1) {
$("#response").append("Success!");
} else {
$("#response").append("Fejl.");
}
}
});
它将数据插入数据库中,但jquery动画不起作用:/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.