js

[jQuery] ajax success html에서 원하는 요소 찾기

hellooooo 2021. 9. 15. 17:40
728x90

$(result).find("찾으려는 요소")

$.ajax({
  type : "GET",  
  url : "url 입력", 
  dataType : "html", 
  success : function(result){
    $(".클래스나 #아이디").html($(result).find(".클래스나 #아이디")); //("찾으려는요소");
  }
});