$("#iframe1").contents().find("#news_text").html("");

iframe1:页面中的iframe的ID;

news_text:iframe内需要被操作的元素的ID;

JS代码如下:

document.getElementById('iframe1').contentWindow.document.getElementById('news_text').style.color='red' 

相关文章:

  • 2021-10-18
  • 2021-09-12
  • 2021-12-24
  • 2021-11-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案