有两个页面,index.aspx和article.html,
index.aspx引入ext必须的一些文件,article.html只引入自己写的js
Ext.get('article').on('click', function() { updateTab(tabID, tabTitle, 'pages/article/article.html'); });
怎么没有显示东西啊?也没有错误,是我的路径问题?我什么路径都试过,还是一样。
事先声明,如果article.html引入Extjs必须的文件,是正常显示的。
各位大侠帮帮忙,被它整了一天。5555~~var tab = new Ext.TabPanel({
width: 500,
height: 300,
renderTo: 'main',
autoDestroy: false,
resizeTabs: true,
minTabWidth: 85,
tabWidth: 135,
enableTabScroll: true,
defaults: { autoScroll: true },
items: [{
id: 'tab_config',
title: '基本配置',
autoLoad: { url: 'Config.aspx', scripts: true }
}],
activeTab: 0,
plugins: new Ext.ux.TabCloseMenu()
});function addTab(tabId, title, url) {
tab.add({
id: tabId,
title: title,
region: 'center',
deferredRender: false,
iconCls: 'tabs',
layout: 'fit',
items: [{
id: tabId,
autoLoad: { url: url, scripts: true, scope: this, nocache: true }
}],
closable: true
}).show();
}
index.aspx引入ext必须的一些文件,article.html只引入自己写的js
Ext.get('article').on('click', function() { updateTab(tabID, tabTitle, 'pages/article/article.html'); });
怎么没有显示东西啊?也没有错误,是我的路径问题?我什么路径都试过,还是一样。
事先声明,如果article.html引入Extjs必须的文件,是正常显示的。
各位大侠帮帮忙,被它整了一天。5555~~var tab = new Ext.TabPanel({
width: 500,
height: 300,
renderTo: 'main',
autoDestroy: false,
resizeTabs: true,
minTabWidth: 85,
tabWidth: 135,
enableTabScroll: true,
defaults: { autoScroll: true },
items: [{
id: 'tab_config',
title: '基本配置',
autoLoad: { url: 'Config.aspx', scripts: true }
}],
activeTab: 0,
plugins: new Ext.ux.TabCloseMenu()
});function addTab(tabId, title, url) {
tab.add({
id: tabId,
title: title,
region: 'center',
deferredRender: false,
iconCls: 'tabs',
layout: 'fit',
items: [{
id: tabId,
autoLoad: { url: url, scripts: true, scope: this, nocache: true }
}],
closable: true
}).show();
}
自己解决了,两个页面的js和css都不同就是了
谁都知道EXT怎么怎么强大,你应该去百度知道推广一下“ext 的强大就在于它自身写好了很多js接口和很多css样式”。