Change HTML of an iFrame with jQuery?

前端 未结 4 2141
无人及你
无人及你 2020-11-29 06:24

Is there a way to manipulate the HTML of an iframe that is from the same domain using jQuery?

Thanks for the help.

4条回答
  •  独厮守ぢ
    2020-11-29 07:06

    You'll have to parse the iframe content.

    $("#frameid").contents().find("div").html('My html');
    

    More here : http://api.jquery.com/contents/

提交回复
热议问题