tabs-adv.js
资源名称:ext-3.1.0.zip [点击查看]
上传用户:dawnssy
上传日期:2022-08-06
资源大小:9345k
文件大小:1k
源码类别:
JavaScript
开发平台:
JavaScript
- /*!
- * Ext JS Library 3.1.0
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
- Ext.onReady(function(){
- var tabs = new Ext.TabPanel({
- renderTo:'tabs',
- resizeTabs:true, // turn on tab resizing
- minTabWidth: 115,
- tabWidth:135,
- enableTabScroll:true,
- width:600,
- height:250,
- defaults: {autoScroll:true},
- plugins: new Ext.ux.TabCloseMenu()
- });
- // tab generation code
- var index = 0;
- while(index < 7){
- addTab();
- }
- function addTab(){
- tabs.add({
- title: 'New Tab ' + (++index),
- iconCls: 'tabs',
- html: 'Tab Body ' + (index) + '<br/><br/>'
- + Ext.example.bogusMarkup,
- closable:true
- }).show();
- }
- new Ext.Button({
- text: 'Add Tab',
- handler: addTab,
- iconCls:'new-tab'
- }).render(document.body, 'tabs');
- });