How to get iframe HTML

0 views
Skip to first unread message

Gilson Carvalho

unread,
Feb 24, 2014, 12:22:41 PM2/24/14
to node-...@googlegroups.com
$(function(){
$('#botao').on( 'click', function(){
alert( $('#iframe').contents().html() );
})
});


<button id="botao" type="button">HTML</button>
<iframe id="iframe" src="http://www.gdcweb.com.br" width="500" height="500"></iframe>


This generates an error in nodejs

My iframe shows an external site.


Sorry my bad english

Andy Poole

unread,
Mar 6, 2014, 5:54:03 AM3/6/14
to node-...@googlegroups.com
The way I have it working is:

win.on('loaded', function(){
   var $frameBody = $('#iframe_id').contents().find("body");

});
Reply all
Reply to author
Forward
0 new messages