Ext.state.CookieProvider = function(config){
Ext .state.CookieProvider.superclass.constructor.call(this);
this.path = "/";
this.expires = new Date(new Date().getTime() (1000*60) *60* 24*7)); //7일
this.domain = null;
this.secure = false
Ext.apply(this, config); this.readCookies();
};
Ext.state.CookieProvider = function(config){
Ext.state.CookieProvider.superclass.constructor.call(this); "/" ;
this.expires = new Date(new Date().getTime() (1000*60*60*24*7)) //7일
this.domain = null; >this.secure = false;
Ext.apply(this, config);
this.state = this.readCookies()
};
기본 저장 시간을 변경하는 값입니다. 예:
코드 복사
코드는 다음과 같습니다. this.expires: new Date(new Date().getTime() (1000*60*60*24*365)), //1년
this.expires: new Date(new Date(). getTime() (1000 *60*60*24*365)), //1년
또는 Ext.onReady 함수의 시작 부분에 다음 코드를 추가할 수 있습니다
new Ext. state.CookieProvider({
expires: new Date(new Date().getTime() (1000*60*60*24*365)), //1년
}))