Access iframe in jQuery

jquery closest and parents

Sometimes it is very difficult to get content which is present in iframe. In this case normal javascript will not work.

Here is a simple code to access iframe in jQuery:

$('#frame1').load( function(){
  $(this.contentDocument).find('body').html('This frame was modified with jQuery! Yay!!!')
});
You may like:  How to check checkbox with jQuery?

Leave a Reply

Your email address will not be published. Required fields are marked *