jQuery Ajax 呼び出しメソッドの成功に問題があります。私はすべてを試しましたが、成功は呼んでいません。私のコードは次のようになります
$('#target').submit(function(event) {
// get the form data
var formData = {
'name': $('input[name=name]').val(),
'surname': $('input[surname=surname]').val(),
};
// process the form
$.nette.ajax({
type: 'POST',
url: {link Admin:uploadData},
data: formData, // our data object
dataType: 'json',
async: false,
contentType: "application/json",
off: ['unique'],
success: function(payload){
console.log(payload.message.lol);
}
})
event.preventDefault();
});
私はnette Webフレームワークを使用しています。Firefox でコードをデバッグすると、次のような応答が返されます。
アドバイスをありがとう。