Jquery Ajax Get Div

Sumguysk8

Ajax 응답에 문제가 있습니다.

내 .php 파일은 테이블을 생성합니다

    <div class="result">
        <tr class="distr">
           <td><input name="somename" value="value"></input</td>
           <td>..more input</td>
           ...more <tds>
       </tr>
    <div>

.js 파일

//...unrelated code up here

$.ajax({
    type: "POST",
    url: "myphpfile.php",
    data: "data that creates table",
    success: function(r) {
        var getdata = $(r).filter(".result");
        console.log(getdat);
    }
});

내 주요 파일에는

<table class="tbl">
   <tr>
       <td><input></input></td>
       ...
   </tr>
</table>

내 PHP 파일에 의해 생성 된 테이블을 추가하려고합니다.

<table class="tbl">

하지만 내가받는 반응은

<input>...</input>
<input>...</input>
some other div children here
<input>...</input>
some text

모든 것 대신

<div class="result">

누군가 이것이 어떻게 작동하는지 설명해 줄 수 있습니까? 또한 .filter () 대신 .find ( ". result")를 시도했습니다. 아 그리고 그 div가 반환되는 것을 원하지 않습니다. 그 안에있는 테이블 만 반환됩니다.

이해하기 어려운 경우 죄송합니다. 입력 할 때이 모든 것이 이상해 보입니다.

감사

카파

당신의 교체 div로모그래퍼 table가 적절한 HTML 수 있도록.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

jQuery Ajax to update DIV

분류에서Dev

AJAX get div from HTML

분류에서Dev

jQuery Ajax GET 및 contentType?

분류에서Dev

jquery ajax simple post/get

분류에서Dev

how to get div content by jquery?

분류에서Dev

Get access to the child of a div in jquery

분류에서Dev

Ajax 요청 JQuery 전송 div

분류에서Dev

앵커의 JQuery Ajax / PHP GET

분류에서Dev

jQuery get last visited url in ajax page

분류에서Dev

jquery $ .ajax () $ .get () 형식화?

분류에서Dev

get property from data variable in ajax jQuery

분류에서Dev

jQuery DataTables Ajax GET json 형식

분류에서Dev

Issue to get un asign height of a div with jquery

분류에서Dev

How to get width from animated div in jQuery

분류에서Dev

Jquery - Get DIV text with Class within Class

분류에서Dev

jQuery $.get() and $.ajax() doesn't get data from PHP

분류에서Dev

DIV를 업데이트하는 jQuery Ajax

분류에서Dev

기존 DIV에 jQuery AJAX 응답 추가

분류에서Dev

Jquery / Ajax update Span or Div by ID without refreshing page

분류에서Dev

Jquery & Ajax-GET 요청 텍스트가 텍스트 상자에 표시되지 않지만 div에 표시됨

분류에서Dev

JQuery ajax GET을 POST로 변환

분류에서Dev

jquery ajax form validation not working with GET method codeigniter

분류에서Dev

JQUERY AJAX GET-CORS 헤더 PHP

분류에서Dev

Get data value from php array with autocomplete jquery/ajax

분류에서Dev

how to get only 3 lines from div with jquery

분류에서Dev

Jquery-Ajax 호출 결과에서 DIV의 내용을 표시하는 Ajax

분류에서Dev

하나 이상의 div가있는 JQuery, Ajax 결과 첨부

분류에서Dev

jquery ajax는 PHP를 지정된 div에로드합니다.

분류에서Dev

jquery Ajax 및 PHP로 단일 Div 새로 고침