1.iframe使用:根据数据自动增长页面的高度设置
<div style="padding-top:10px;">
<iframe id=“frame” src="" onload="Javascript:setHeight(this)" style="width: 100%;border: 0px;margin:0;display: none"></iframe>
</div>
function setHeight(obj){
var w=obj;
if (document.getElementById){
if (w && !window.opera){
if (w.contentDocument && w.contentDocument.body.offsetHeight){
w.height = w.contentDocument.body.offsetHeight+40;
}else if(w.Document && win.Document.body.scrollHeight){
w.height = win.Document.body.scrollHeight+40;
}
}
}