1
나는 ajax 호출을하고 결과에 따라 나는 img를 swop하고 alert를 발동 할 것이다. 어느 쪽도 일어나지 않고있다. 그러나 나는 이것이 일어나지 않고있는 이유를 해석 할 수 없다??Jquery if 문을 Ajax 호출로 사용
var myd = "";
$.ajax({
url:"urlencode.php",
data: data,
type: "POST",
success: function(data) {
myd = $('<span />').html(data).find("#Result").text();
console.log(myd);
if (myd == 'c5:3;'){$(this).attr('src','lightbulboff.png')};
},
error: function (request, status, error)
{
alert(request.responseText);
}
});