我试图访问IFRAME这是在表里面。 有人可以请建议如何访问使用jQuery的?
<table class="cke_editor">
<tr>
<td id="cke_contents_short_description">
<iframe>
<html>
<body id="cke_pastebin" style="color:red">
</body>
</html>
</iframe>
</td>
</tr>
</table>
我的问题是我想删除从jQuery的cke_pastebin风格,是表> IFRAME> TD内。
其实我已经做了简单的身体标记。如下所示,它工作正常。
$(document).ready(function() {
var isId = (document.body.id === 'cke_pastebin');
if (isId) {
$("#cke_pastebin").removeAttr("style");
}
});
有人可以建议我该怎么做?
['.children()'](https://api.jquery.com/children/)可能会帮助你。 – Henders
嗨亨德斯,感谢您的回复,但没有不是。我已经尝试过,但没有工作 – Punam
您在整个html页面中有单个iframe或多个? –