我试图从iframe中删除几个div选项卡,使用iframe中设置的onload函数来简化在一个位置中的所有内容。不能强调不够,因为大多数人似乎忽略了这样的事实,我想使用的onload在这个< IFRAME>尝试删除/删除内部框架中的div使用onload
<iframe scrolling=no frameborder=0 src='insertwebsitehere' width=100% onload="this.height=this.contentWindow.document.body.scrollHeight;" > #document </iframe>
在div标签我想删除没有特定的ID,但类代替
class="d2l-page-actions-container d2l-right"
class="d2l-action-buttons"
我想到了在onload功能附加这样的事情;
<iframe onload="this.height=this.contentWindow.document.body.scrollHeight;this.contentWindow.document.html.body.removeClass('insertclasshere');">
但它不工作,建议?
任何帮助表示赞赏,谢谢提前
请参阅https://stackoverflow.com/a/14066534/3088508 –
能够详细说明我在寻找什么,这将适用于我的情况? – Toreono
[按类名删除元素?](https://stackoverflow.com/questions/4777077/removing-elements-by-class-name) – sniperd