繁体   English   中英

jQuery停止插入数据库

[英]jquery stops insert into database

我已经制作了这个脚本,但是随后我按了jquery动画开始提交,但它不会使用PHP:S将其提交到数据库中。

这是我的剧本

http://pastebin.org/68943

谢谢

在进行插入的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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM