function setHeight() {
var iframes = parent.document.getElementsByClassName('targetIframe');
for(var i = 0; i < iframes.length; i++)
iframes[i].height = document['body'].offsetHeight;
}
A variation of this answer.
It's using the getElementsByClassName
function,which is not supported by IE.
How to rewrite it with jQuery?