$("#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'
未经允许不得转载:任鹏个人博客 » js&jquery操作页面中iframe内的dom元素


朋友圈点赞图在线生成源码