如何让 iframe 内嵌页面内容显示完全?

编程夜猫 2013-11-21 11:19:08


如图所示,
右边的html代码为:

<div id="tabframe"region="center" class="easyui-tabs" fit="true" border="false" >
<div id="tab1"title="主页" >
<iframe id="contentPage" style="width:100%;height:100%; " scrolling="yes" frameborder="0" marginheight="0"
marginwidth="0"></iframe>
</div>
</div>

点击左面的树,Js如下

onClick: function (node) {
$(this).tree('toggle', node.target);
$("#contentPage").attr("src", node.attributes);




====
子页面html如下
<body class="easyui-layout" >
<table id="userManageGrid" fit="true" style="overflow:hidden;padding:2px;" ></table>
</body>

**********************

目前有2问题,1.子页面里的分页栏显页不了。2.子页面右边还有内容显示不全。
本人学做web不太多。
请问,如何让子面而里的内容显示完全并满铺于iframe。且能按浏览器窗口在小变化时随时调整。
...全文
5739 9 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
您好,我遇到了同样的问题 ,请问 不显示分页条的问题是怎么解决的
编程夜猫 2013-11-21
  • 打赏
  • 举报
回复
OK
编程夜猫 2013-11-21
  • 打赏
  • 举报
回复
引用 3 楼 showbo 的回复:
在增加fit:true,自动填充父容器
找到问题在哪了。谢谢。 但浏览器窗口大小变化,好象不太好 实现内容跟着同步调整大小。
编程夜猫 2013-11-21
  • 打赏
  • 举报
回复
引用 3 楼 showbo 的回复:
在增加fit:true,自动填充父容器
不行,没用。

collapsible: false,
                fitColumns: true,
                singleSelect: true,
                fit:true,
                remoteSort: false,
                sortName: 'UserId',
                sortOrder: 'asc',
                striped: true,
                nowrap: true,
                idField: 'UserId',
                method: 'get',
                loadMsg: '正在加载数据...',
  • 打赏
  • 举报
回复
在增加fit:true,自动填充父容器
编程夜猫 2013-11-21
  • 打赏
  • 举报
回复
引用 1 楼 showbo 的回复:
grid配置fitColumns:true试试
有的,已经配置了。

$('#userManageGrid').datagrid({
               
                collapsible: false,
                fitColumns: true,
                singleSelect: true,
                
                remoteSort: false,
                sortName: 'UserId',
                sortOrder: 'asc',
                striped: true,
                nowrap: true,
                idField: 'UserId',
                method: 'get',
  • 打赏
  • 举报
回复
grid配置fitColumns:true试试
编程夜猫 2013-11-21
  • 打赏
  • 举报
回复
引用 7 楼 showbo 的回复:
配置fit,fitColumns都为true,同时iframe的window注册resize事件试试

$(window).resize(function(){
  $('#gridid').datagrid('resize');
});
是在Grid所在的子页面 注册该事件吗? 好象没效果
  • 打赏
  • 举报
回复
配置fit,fitColumns都为true,同时iframe的window注册resize事件试试

$(window).resize(function(){
  $('#gridid').datagrid('resize');
});

87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧