鸣人不说暗话,来张图:
代码开始:(使用Ext,ajax加载数据,如果你们有好的方法也可以多多交流)
var tabxsk = new Object();
//初始化
tabxsk.init = function () {
test.pageSize = Math.floor((d_right_height() - - ) / );
tabxsk.markpageSize = Math.floor((d_right_height() - - ) / );
tabxsk.mappageSize = tabxsk.pageSize;
// tabxsk.createstore();
/* tabxsk.panel = new Ext.Panel({
id: 'tabxskpane4',
renderTo: 'panel16',
width: 369,
height: d_right_height(),
html: '<div id="tabxskpanel"></div> '
});
tabxsk.BuildingPanel('tabxskpanel');*/
// test.ScreenList();
tabxsk.createTab();
test.store.load({ params: { start: , limit: test.pageSize } }); }; tabxsk.createTab = function (check) { var tab = new Ext.TabPanel({
id: 'mainTab',
renderTo: 'panel16',
width: ,
height: d_right_height(),
enableTabScroll: true, //页签名称
items: [{
id: 'tab1',
title: 'A',//标题
items: [test.createuser()]
}, {
id: 'tab2',
title: 'B',
html: '<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src=' + "ManageIconPage.aspx" + '></iframe>'
},
{
id: 'tab3',
title: 'C',
// layout: 'form',
html: '<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src=' + "tabxsk.aspx" + '></iframe>' } ],
}); //默认打开第一个tab
tab.items.get().show(); //获取items的id
var i = tab.items.items;
for (var j = ; j < i.length; j++) {
//var k = i[j].id;
//alert(i);
//alert(i[j].id); } //alert(tab.getActiveTab().tabConfig.id);
//this.tab.activate(0); return this.tab;
}; //tab选项卡内容 var test = new Object();
//type = null; test.createuser = function () {
test.store = new Ext.data.JsonStore({
totalProperty: 'totalCount',
root: 'result',
proxy: new Ext.data.HttpProxy({ url: "handler/tab.ashx?funcName=GetList" }),
fields: [
{ name: 'id' },
{ name: 'name' },
{ name: 'type' },
{ name: 'opt' },
{ name: 'the_geom' }
],
remoteSort: true
});
test.store.setDefaultSort('name', 'ASC');
var tbar = ['关键字搜索: ', {
xtype: 'textfield',
id: 'tabxsk_keyword',
width:
}, '-', {
text: '查询',
xtype: "button",
handler: test.gridSearch
}, ]; }); var listeners = {
'render': function () { //tbar1.render(this.tbar);
tbar2.render(this.tbar);
tbar3.render(this.tbar); }
};
var colM = new Ext.grid.ColumnModel([
new Ext.grid.RowNumberer(),
//{ header: " 名称 ", dataIndex: "name", width: 150, align: 'left', sortable: true, renderer: test.listicon },
{ header: " 名称 ", dataIndex: "name", width: , align: 'left', sortable: true, renderer: test.listCss1 },
{ header: " 操作 ", dataIndex: "id", width: , align: 'center', sortable: false, renderer: test.listAction } ]); //grid填充数据
test.grid = new Ext.grid.GridPanel({
id: 'testGrid',
//renderTo: 'yhgl_user',
height: d_right_height() - ,
//autoHeight: true,
autoScroll: true,
width: ,
cm: colM,
viewConfig: {
forceFit: true //每列自动充满Grid
},
emptyText: '暂无数据!',
store: test.store,
stripeRows: true,
loadMask: true,
tbar: tbar,
listeners: listeners,
bbar: new Ext.PagingToolbar({
pageSize: test.pageSize,
store: test.store,
displayInfo: true,
displayMsg: '共{2}条',
emptyMsg: '暂无记录'
})
});
return test.grid;
};
//获取数据列表
test.getList = function (args) {
var keyword = $('test_keyword').get('value');
if (args == null) args = new Object();
if (args.all) {
test.store.baseParams = null;
} else {
test.store.baseParams = {
wkt: args.wkt ? args.wkt : null,
keyword: keyword ? escape(keyword) : null,
center: args.center ? args.center : null,
border: args.border ? args.border : null,
distance: args.distance ? args.distance :
};
}
test.store.proxy = new Ext.data.HttpProxy({ url: "handler/tab.ashx?funcName=GetList" });
/*test.store.load({
params: { start: 0, limit: test.pageSize }
});*/
}; //列表数据
test.listCss1 = function (value, cellmeta, record, rowIndex, columnIndex, store) {
return '<input type="checkbox" name="checkbtn_tabxsk" value="" style="width:13px;height:13px" id=' + record.data.id + '> '
+ ' <a href="javascript:void(0);" title="查看信息" class="lzhe" onclick="test.showContent(' + rowIndex + ')" >' + value + '</a>';
}; //列表按钮样式
test.listAction = function (value, cellmeta, record, rowIndex, columnIndex, store) {
return '<a href="javascript:void(0);" title="点击查看" class="lblue" onclick="test.showTuYa(' + rowIndex + ');">查看</a>&nbsp' +
'<a href="javascript:void(0);" title="保存" class="lblue" onclick="test.saveTuYa(' + rowIndex + ');">保存</a>&nbsp'
+ '<a href="javascript:void(0);" class="lblue" title="点击编辑信息" style="cursor:pointer " onclick="test.editBuilding( ' + rowIndex + ');">编辑</a>';
}; test.marklistCss1 = function (value, cellmeta, record, rowIndex, columnIndex, store) {
return '<input type="checkbox" name="checkbtn1" value="" style="width:13px;height:13px" id=' + record.data.id + '> <a href="javascript:void(0);" title="' + value + '" class="lzhe" >' + value + '</a>';
};


//每个人的代码方式都不一样,希望对您有用!

Ext选项卡tabpanel切换动态加载数据的更多相关文章

  1. Extjs-树 Ext.tree.TreePanel 动态加载数据

    先上效果图 1.说明Ext.tree.Panel 控件是树形控件,大家知道树形结构在软件开发过程中的应用是很广泛的,树形控件的数据有本地数据.服务器端返回的数据两种.对于本地数据的加载,在extjs的 ...

  2. AppCan学习笔记----关闭页面listview动态加载数据

    AppCan页面关闭 AppCan 的页面是由两个HTML组成,如果要完全关闭的话需要在主HTML eg.index.html中关闭,关闭方法:appcan.window.close(-1); 管道 ...

  3. [JS前端开发] js/jquery控制页面动态加载数据 滑动滚动条自动加载事件

    页面滚动动态加载数据,页面下拉自动加载内容 相信很多人都见过瀑布流图片布局,那些图片是动态加载出来的,效果很好,对服务器的压力相对来说也小了很多 有手机的相信都见过这样的效果:进入qq空间,向下拉动空 ...

  4. 微信小程序(五) 利用模板动态加载数据

    利用模板动态加载数据,其实是对上一节静态数据替换成动态数据:

  5. mui 动态加载数据出现的问题处理 (silder轮播组件 indexedList索引列表 下拉刷新不能继续加载数据)

    mui-slider 问题:动态给mui的图片轮播添加图片,轮播不滚动. 解决:最后把滚动轮播图片的mui(".mui-slider").slider({interval: 300 ...

  6. ASP.NET MVC动态加载数据

    ASP.NET MVC动态加载数据,一般的做法是使用$.each方法来循环产生tabel: 你可以在html时先写下非动态的部分:  Source Code 上图中,有一行代码: <tbody ...

  7. js实现滚动条来动态加载数据

    主要angular2+es6 data:Array<any> //展示的数据 allData:Array<any> //全部的数据 size:number = 10 //每次动 ...

  8. vue 实现tab切换动态加载不同的组件

    vue 实现tab切换动态加载不同的组件 使用vue中的is特性来加载不同的组件.具体看如下代码:这个功能对于vue比较复杂的页面可以使用上,可以把一个页面的功能拆分出来,使代码更简单.使用方式具体看 ...

  9. js/jquery控制页面动态加载数据 滑动滚动条自动加载事件--转他人的

    js/jquery控制页面动态加载数据 滑动滚动条自动加载事件--转他人的 相信很多人都见过瀑布流图片布局,那些图片是动态加载出来的,效果很好,对服务器的压力相对来说也小了很多 有手机的相信都见过这样 ...

随机推荐

  1. resultset 查询时返回多个相同值

    背景 做个简单的接口开发,拿到的平台比较不理想,好久没重新搭建一个了,正好练练手.用了基础的servlet,maven,logback(log4j不支持格式化,比较烦人),fastjson,druid ...

  2. Android屏幕旋转

    一个手机最基本的旋转方向有上面4种,而在Android开发中,涉及到屏幕旋转的地方很多,而且各个函数给出的角度值都不一样,比如 Activity的getRotate,Camera的setDisplay ...

  3. Spring-boot 国际化

    在application.properties文件中配置 spring.message.basename=i18n.login 页面使用 th:text="#{login.tip}" ...

  4. Niagara workbench (Basic )

    1.the basic information about workbench Last saved  station open in the workbench or opened  another ...

  5. sqlalchemy的使用

    from sqlalchemy import Column, Integer, String, Text, ForeignKey, DateTime, UniqueConstraint, Index ...

  6. PADS Logic VX.2.3 修改软件界面语言

    操作系统:Windows 10 x64 工具1:PADS Logic VX.2.3 2019.03.19 星期二 晴 记录一件伤心的事,因为公司要求统一原理图设计.PCB Layout工具,所以,以后 ...

  7. Windows Internals 笔记——字符和字符串处理

    1.自Windows NT起,Windows的所有版本都完全用Unicode来构建,调用Windows函数时,如果向它传入一个ANSI字符串,那么函数首先会把字符串转换为Unicode,再把结果传给操 ...

  8. CSS之三个模型 盒子模型 轮廓模型 内外边距

    盒子模型 最终元素的总宽度计算公式是这样的: 总元素的宽度=宽度+左填充+右填充+左边框+右边框+左边距+右边距 元素的总高度最终计算公式是这样的: 总元素的高度=高度+顶部填充+底部填充+上边框+下 ...

  9. Spring Boot MongoDB 查询操作 (BasicQuery ,BSON)

    MongoDB 查询有四种方式:Query,TextQuery,BasicQuery 和 Bson ,网上太多关于 Query 的查询方式,本文只记录 BasicQuery和Bson 的方式,Basi ...

  10. 设计模式学习之责任链模式(Chain of Responsibility,行为型模式)(22)

    参考:http://www.cnblogs.com/zhili/p/ChainOfResponsibity.html 一.引言 在现实生活中,有很多请求并不是一个人说了就算的,例如面试时的工资,低于1 ...