var frame = document.getElementById('#frame'),
win = frame.contentWindow,
doc = win.document,
html = doc.documentElement,
body = doc.body;
// 获取高度
var height = Math.max( body.scrollHeight, body.offsetHeight,
html.clientHeight, html.scrollHeight, html.offsetHeight );
frame.setAttribute('height', height);