index.html 页面

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.easyui.min.js"></script>
<script type="text/javascript"> $('#tabs').tabs({
pill:true
}); if(user==""){
window.location="${pageContext.request.contextPath}/index.jsp";
} </script> <title>首页</title>
</head>
<body class="easyui-layout" data-options="fit : true,border : false" > <div data-options="region:'north'" style="height:80px">
<jsp:include page="top.jsp"></jsp:include>
</div> <!-- <div data-options="region:'east',split:true" title="East" style="width:100px;"></div> -->
<div data-options="region:'west',split:true" title="权限菜单" style="width:220px;">
<div class="easyui-accordion" style="height:100%;"> </ul>
</div>
</c:if>
</c:forEach> </div>
</div>
<div data-options="region:'center',split:true" style="padding: 0px;overflow:hidden;">
<div id="tabs" class="easyui-tabs" data-options="fit : true" >
<div title="About" >
系统首页,无法关闭
</div> </div> </div>
</body>
</html> <script type="text/javascript" src="${pageContext.request.contextPath}/js/aup.js"></script>

 

tabs 内嵌页 包含datagrid ; datagrid 外包一定要套一个div 并且设置高度,不然无法显示.

<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@ include file="/include/taglib.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>系统信息列表</title> <link rel="stylesheet" type="text/css" href="${ctx}/css/easyui.css">
<link rel="stylesheet" type="text/css" href="${ctx}/css/icon.css"> </head>
<body style="margin: 0px auto;" > <div style="height:780px;">
<table id="tt" title="系统列表"></table>
</div> </body>
</html>

 datagrid js 代码

$(function() {
$('#tt').datagrid({
url: ctx + '/system/lisSystem.do',
height:'500px',
pagination: true,
/*是否显示下面的分页菜单*/
border: false,
fit : true,
fitColumns:true,//自动使列适应表格宽度以防止出现水平滚动。
rownumbers: true,
toolbar: toolbar,
selectOnCheck: true,
checkOnSelect: true,
loadMsg: '数据加载中,请稍候......',
columns: [[{
field: 'id',
title: '系统id',
checkbox: true,
width: 220
},
{
field: 'sysName',
title: '系统名称',
width: 150
},
{
field: 'sysCode',
title: '系统编码',
width: 150,
align: 'right'
},
{
field: 'status',
title: '系统状态',
width: 80,
align: 'right',
formatter: function(value, row, index) {
if (row.status == 0) {
return "启用";
} else if (row.status == 1) {
return "禁用";
} else {
return "删除";
}
}
},
{
field: 'operate',
title: '操作',
width: 150,
align: 'center',
formatter: formatOper
}]]
});
});

  

easyUI loyout tabs自适应宽度的更多相关文章

  1. 第二百节,jQuery EasyUI,Tabs(选项卡)组件

    jQuery EasyUI,Tabs(选项卡)组件 学习要点: 1.加载方式 2.属性列表 3.事件列表 4.方法列表 5.选项卡面板 本节课重点了解 EasyUI 中 Tabs(选项卡)组件的使用方 ...

  2. 从三栏自适应宽度布局到css布局的讨论

    如何实现一个三栏自适应布局,左右各100px,中间随着浏览器宽度自适应? 第一个想到的是使用table布局,设置table的宽度为100%,三个td,第1个和第3个固定宽度为100px,那么中间那个就 ...

  3. UEditor百度富文本编辑器--让编辑器自适应宽度的解决方案

    UEditor百度富文本编辑器的initialFrameWidth属性,默认值是1000. 不能够自适应屏幕宽度.如图1: 刚开始的时候,我是直接设置initialFrameWidth=null的.效 ...

  4. JS实现自适应宽度的Tag切换

    效果体验:http://hovertree.com/texiao/js/3.htm 该效果使用纯JavaScript代码,实现TAB页切换效果,TAB标签根据内容自适应宽度,点击TAB标签切换内容页. ...

  5. RelativeLayout中的格局,自适应宽度布局

    RelativeLayout中的布局,自适应宽度布局 该图片中为android布局:总布局为 RelativeLayoutAtLeft 为居左 <TextView android:backgro ...

  6. Qt的tablewidget行列头自适应宽度

    Qt构造一个TableWidget后,窗口最大化后,列头默认不能自适应宽度,研究了一下,Qt提供了两种方式来处理这个问题,如下:   1. 使用horizontalHeader()->setRe ...

  7. [Winform]DataGridView列自适应宽度

    引言 在做winform项目中,数据控件DataGridView的使用多多少少是会用到的,如果不设置它的属性,默认情况下是不会自适应宽度的,你想查看某项的数据,就不得不将标题栏拖来拖去,挺烦的. 方法 ...

  8. ASP.NET实例——漂亮的自适应宽度的导航条(仿Discuz!)

    PHP比较成熟的开放的源代码比较多,比方说PrestaShop,比方说Discuz!...... 虽然语言不同,但基本原理是一样的,有时间的话读一读,对学习ASP.NET应该是非常有好处的(唉,什么时 ...

  9. 漂亮的自适应宽度的多色彩CSS图片按钮

    一.素材               二.效果 三.CSS *{padding:0;margin:0} /*----------------------------------- 自适应宽度图片按钮 ...

随机推荐

  1. storm进程正常运行一段时间shut down,运维方式

    storm启动一段时间后,无征兆的停止了,然后nimbus,supervisor,ui所有的worker都stop了. 我用的storm是0.8.2版本的 nimbus中留下的log如下 -- :: ...

  2. 把文本框嵌入到form

    <form action="/submit-cat-photo"> <input type="text" placeholder=" ...

  3. 实战Hadoop中遇到的几个类、接口说明

    1. Configuration :public 类型接口,这个接口包含的多数方法是进行与数据属性<key,value>有关的操作. 几个方法: 1)addProperty(String ...

  4. CF# Educational Codeforces Round 3 D. Gadgets for dollars and pounds

    D. Gadgets for dollars and pounds time limit per test 2 seconds memory limit per test 256 megabytes ...

  5. linux 安装eclipse 和cdt

    这个东西说起来简单,但是经历了无数次到失败,终于还是安装完成了. 最早到时候我下载了eclipse和cdt让后安装,安装完成以后,无法运行和编译程序 后来我学到了一个牛逼的命令yum 这个命令会帮助我 ...

  6. MySQL数据类型和常用字段属性总结

    前言 好比C++中,定义int类型需要多少字节,定义double类型需要多少字节一样,MySQL对表每个列中的数据也会实行严格控制,这是数据驱动应用程序成功的关键.MySQL提供了一组可以赋给表中各个 ...

  7. jquery 操作iframe的几种方法总结

    iframe在复合文档中经常用到,利用jquery操作iframe可以大幅提高效率,这里收集一些基本操作 DOM方法: 父窗口操作IFRAME:window.frames["iframeSo ...

  8. Linux多线程实例练习 - pthread_create()

    Linux多线程实例练习 pthread_create():创建一个线程 int pthread_create(pthread_t *tidp, const pthread_attr_t *attr, ...

  9. 使用ADO.NET访问数据库

    第一种连接数据库的方法:可以使用.ET Framework提供程序的sqlConnection对象,使用无参数的构造函数创建Connection对象,代码如下: string strcon = &qu ...

  10. 获取IP(windows和linux)

    #ifdef _WIN32 #include <winsock2.h> #include <Ws2tcpip.h> #pragma comment(lib,"ws2_ ...