鸣人不说暗话,来张图:
代码开始:(使用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. sed 正则 ! 取反

    !符号表示取反,x,y!表示匹配不在x和y行号范围内的行,利用sed命令用于的阿银不在2-7之间的行 [111 sed]$ cat input [111 sed]$ sed -n '2,7!p' in ...

  2. 金蝶K/3 跟踪语句_业务单据

    跟踪语句_业务单据_BOM select * from t_TableDescription where Ftablename like '%ICBOM%' order by FFieldName o ...

  3. linux基础命令学习笔记(一)

    2019年4月1日: “目录” = “文件夹” 常用命令(一): 1.ls: list 列表,默认当前文件夹的文件和目录 linux:命令+选项+参数 ls -l:长输出,列出文件的详细信息 - rw ...

  4. Consideration about improving mathematics study

    In this article, I’ll present my ideas about how to improve mathematics study, which are the forewor ...

  5. 如何在Python脚本中调用外部命令(就像在linux shell或Windows命令提示符下输入一样)

    如何在Python脚本中调用外部命令(就像在linux shell或Windows命令提示符下输入一样) python标准库中的subprocess可以解决这个问题. from subprocess ...

  6. Skeleton Screen -- 骨架屏--应用

    案例:使用 现已经在支付的项目使用 用户体验一直是前端开发需要考虑的重要部分,在数据请求时常见到锁屏的loading动画,而现在越来越多的产品倾向于使用Skeleton Screen Loading( ...

  7. Linux 添加到环境变量

    在Linux下使用源码安装软件的时候,通常只能在软件安装目录下使用该软件命令,这样太麻烦,我们希望全局使用,可以将软件安装路径添加到系统环境变量里. 添加环境变量有2种方法: 1. 使用export命 ...

  8. JS 的骚操作

    一.强制类型转换 1.1string强制转换为数字 //可以用*1来转化为数字((实际上是调用.valueOf方法) 然后使用Number.isNaN来判断是否为NaN,或者使用 a !== a 来判 ...

  9. SQL语句删除表中的字段只留下最新一行

    方法一 DELETE FROM A WHERE `name` in ( SELECT a.name FROM( SELECT name FROM A a GROUP BY name HAVING CO ...

  10. 清除电脑缓存的bat文件

    电脑在使用了之后,会产生垃圾缓存,若不及时清理会降低电脑的运行速度. 1.步骤: 2.新建一个记事本文件,命名“系统清理”;(或其他名字) 3.原封不动复制下面的文字到该记事本中 @echo off ...