当有iframe子页面时出现的高度不能由动态数据撑开的问题
添加下面函数
}![]()
$(function(){ function IFrameResize(){ //alert(this.document.body.scrollHeight); //弹出当前页面的高度 $('#ifme', window.parent.document).css('height',this.document.body.scrollHeight+100) }; $.ajax({ type:'post', url:'/prdeft-web/appDeviceCard/getDeviceLists', data:{'sgId':1724}, success:function(result){ /* alert("hello word"); */ var table_device_html=""; for(var i=0;i<result.length;i++){ table_device_html=table_device_html +'<tr><td>'+'<input type="checkbox" />' +'</td><td>'+result[i].deviceCode +'</td><td>'+result[i].deviceName +'</td><td>'+result[i].deviceProperty +'</td><td>'+result[i].state +'</td><td>' +'</td><td>' +'</td><td>' +'</td><td>' +'</td></tr>' } $("#table_device_html").html(table_device_html); IFrameResize(); }, error:function(){ alert("error"); } })