這是ajax代碼:$.ajax({ url: '/api/v1/register', data: JSON.stringify({username: $username, email: $email, password: $password}), contentType: 'application/json', type: 'POST', dataType: 'json', success: function (msg) { console.log(msg) console.log('hello!') }, error: function (error_msg) { console.log(error_msg) console.log('wrong!') } })
為什么ajax post json后,返回200,但是ajax回調函數卻進入error?
嗶嗶one
2018-11-15 18:18:18