[data-order]
속성이 정의되지 않은 테이블의 모든 행을 찾는 방법은 무엇입니까?속성이 정의되지 않은 테이블의 모든 하위 행을 찾아서 제거하십시오.
this.tbl_list[0].rows.find('[data-order="undefined"]').remove();
이 반환 : 당신은 부정 할 수
this.tbl_list[0].rows.find is not a function
[data-order]
속성이 정의되지 않은 테이블의 모든 행을 찾는 방법은 무엇입니까?속성이 정의되지 않은 테이블의 모든 하위 행을 찾아서 제거하십시오.
this.tbl_list[0].rows.find('[data-order="undefined"]').remove();
이 반환 : 당신은 부정 할 수
this.tbl_list[0].rows.find is not a function
.rows
은 jQuery 객체가 아닌 DOM 속성이므로 .find()
을 호출 할 수 없습니다.
그래서이 시도 :
$(this.tbl_list[0].rows).find(':not[data-order]').remove();
(다른 답변에 감사를 테스트 반전에 대해, undefined
가 속성 선택에서 작동하지 않습니다 이후)
this.table_list[0].find('td:not([data-order])').remove();
편집 - 이것은 data-order
속성이없는 행입니다. 실제 값 'undefined'를 찾으려면 @ Alnitak의 대답으로 가십시오.
을'table_list [0]의'DOM 경우 엘리먼트는 여전히'.find()'를 호출 할 수 없다. – Alnitak