EasyUI Tabs
2015-09-09 08:20
405 查看
使用js来加载tab,防止多次加载
举例:
html代码
tab js调用方法
js加载方法
iframe自适应
以前使用的方法,使用easyui-tabs来加载内容,使用iframe来展示内容
举例:
html代码
<body> <div id="tt" class="easyui-tabs"></div> </body>
tab js调用方法
$(function() { var titleArray = [ "基本信息", "其它信息" ]; var urlArray = [ "view?guid=${guid}", "other?guid=${guid}" ]; loadTab(titleArray, urlArray); });
js加载方法
function loadTab(titleArray, urlArray) { for (var i = 0; i < titleArray.length; i++) { var content = '<iframe class="frame-size" src="' + urlArray[i] + '"></iframe>'; $('#tt').tabs('add', { title : titleArray[i], content : content }); } // 默认选中第一个 $('#tt').tabs({ selected : 0 }); // 高度自适应 $(".frame-size").height($("body").height() - $(".tabs-header").height()); }
iframe自适应
iframe { width: 100%; height: 100%; border: 0; }
以前使用的方法,使用easyui-tabs来加载内容,使用iframe来展示内容
<body> <div id="tt" class="easyui-tabs"> <div title="基本信息" data-options="selected:true"><iframe class="frame-size" src="view?guid=${guid}"></iframe></div> <div title="其它信息"><iframe class="frame-size" src="other?guid=${guid}"></iframe></div> </div> </body>
相关文章推荐
- BinaryTreePath
- Leetcode Implement Queue using Stacks
- iOS8 自定义UITabBar (使用popToViewController导致的UITabBarButton重叠的问题)
- Leetcode Implement Stack using Queues
- Android Call requires API level 11 (current min is 8)的解决方案
- Implement stack using a queue
- LCT - hdu4010 Query on The Trees
- UVA11572_Unique Snowflakes
- UVA1152_4 Values whose Sum is 0
- 块设备驱动程序中request方式和make_request方式的区别(阅读笔记)
- UIPageViewController bug
- N-Queens LeetCode OJ
- build wireshark on windows
- Google Guice使用入门
- easyui小技巧
- leetcode Unique Binary search Trees
- java 图形界面 gui
- Windows下GUI编程——窗口
- easyui----tree
- Google Guice使用入门