转自:http://witmax.cn/extjs-cookie-theme-lang.html
使用Cookie:
1
2
3
|
Ext.state.Manager.setProvider( new Ext.state.CookieProvider()); Ext.state.Manager.set( "key" , "value" ); var cookievalue= Ext.state.Manager.get( "key" ); |
切换主题:
1
2
3
4
|
//使用默认主题 Ext.util.CSS.removeStyleSheet( 'theme' ); //切换到其他主题 Ext.util.CSS.swapStyleSheet( 'theme' , cssFilePath); |
切换语言:
1
2
3
4
5
6
|
var head = Ext.fly(document.getElementsByTagName( 'head' )[0]); Ext.DomHelper.append(head, { tag: 'script' ,type: 'text/javascript' ,src: 'ext/source/locale/ext-lang-' + lang + '.js' }); |