使用 jQuery 更改 iFrame 的 HTML? [英] Change HTML of an iFrame with jQuery?
本文介绍了使用 jQuery 更改 iFrame 的 HTML?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法使用 jQuery 操作来自同一域的 iframe 的 HTML?
Is there a way to manipulate the HTML of an iframe that is from the same domain using jQuery?
感谢您的帮助.
推荐答案
您必须解析 iframe 内容.
You'll have to parse the iframe content.
$("#frameid").contents().find("div").html('My html');
更多信息:http://api.jquery.com/contents/
这篇关于使用 jQuery 更改 iFrame 的 HTML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文