728x90
해결
.done부분 괄호를 제대로 못 닫고 엉뚱하게 닫아서 유발됨.
Uncaught TypeError: $(...).each(...).done is not a function
deleteById: function () {
//let id = $("#id").val(); 아래 data부분 없애고 이렇게만 넣으면 - (1/3)
$("input[name=no]:checked").each(function () {
var no = $(this).attr("value");
console.log(no);
$.ajax({
type: "DELETE",
url: "/index/board/detail/" + no,
data: JSON.stringify(no),
})
.done(function (resp) {
location.reload;
})
.fail(function (error) {
alert(JSON.stringify(error));
});
});
},
728x90
'JQuery' 카테고리의 다른 글
[JQuery]제이쿼리 줍줍 (0) | 2022.03.29 |
---|---|
jquery를 가져올때 (난 cdn) slim으로 가져왔다. ajax미지원 (0) | 2022.02.22 |
$ajax의 Uri 변수 경로 (0) | 2022.02.21 |
$ajax 공부 (url 주소 보낼땐 시큐리티 조심!//$ajax 통신법은 숙지!) (0) | 2022.02.14 |
[ajax]데이터 전송(체크박스 데이터 등 배열 형태로 데이터 전송) (0) | 2022.02.10 |
댓글