선생님 해도 안됩니다.. 분명 새로고침하면 삭제되는건 맞는데 페이지로 이동이 되지 않습니다ㅠ
제가 뭘 잘못한걸까요..?
$('#delete').click(function(e){
var _id = e.target.dataset.id;
console.log(_id);
$.ajax({
method : 'post',
url : '/detail/delete',
data : { _id : _id }
}).then((result)=>{
window.location.href ='/qna'
//AJAX 성공시 실행할 코드적기
}).fail((xhr,code,err)=>{
//AJAX 실패시 실행할 코드적기
});
alert();메시지를 넣으려고 해도 되지 않습니다ㅠㅠ