The following code works fine in all browsers for getting HTML contents from iframe.