提交时出现500服务器错误-Ajax问题?

时间:2019-02-12 19:00:56

标签: ajax forms submit

当我提交表单时出现错误:

POST http://localhost/settings2.php 500 (Internal Server Error)
send @ jquery.js:9600
ajax @ jquery.js:9206
(anonymous) @ app.js:45
dispatch @ jquery.js:5183
elemData.handle @ jquery.js:4991

我认为这是由于此处的某些内容造成的:

  $("form").on("submit", function(e) {
e.preventDefault(); //stop submission
$.ajax({
  url: "/settings2.php",
  dataType: "json",s
  type: "POST",
  data: $(this).serialize(),
  success: function(data){
  location.href = "/results.php";
  }

});

但是我找不到。有指针吗?

0 个答案:

没有答案