내 사이트에 객체를 임베드하고 div를 제거하고 싶습니다. 그게 가능하니? jQuery를 사용하여 객체 태그 안에 특정 ID가있는 div를 제거하려고합니다. 아래 jQuery 시도했지만 div 포함 된 개체 안에 선택하지 않습니다.jQuery를 사용하여 내장 객체 내부에서 div를 제거하십시오.
$("div").filter(function(){
console.log(this.id); // i don't see any of the id's from the div's inside my object
});
편집 :
<object data=http://www.msn.com width='100%' height='100%'>
<embed src=http://www.msn.com width='100%' height='100%'>
</embed> Error: Embedded data could not be displayed. </object>
나는 내 사이트에 포함 된 개체 내부 사업부를 제거해야합니다.
도와주세요.
감사
'this.id'를 대신 사용하십시오. 'id' 속성이없는 jQuery 객체를 만들고 있습니다. – undefined
'this.id' 또는'$ (this) .attr ('id')' –
대신 $ (this) .id 대신에 ?undefined를 사용하십시오. – milan