> 웹 프론트엔드 > JS 튜토리얼 > javascript Ext JS 상태 기본 저장 time_extjs

javascript Ext JS 상태 기본 저장 time_extjs

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
풀어 주다: 2016-05-16 18:56:08
원래의
1031명이 탐색했습니다.
코드 복사 코드는 다음과 같습니다.

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 함수의 시작 부분에 다음 코드를 추가할 수 있습니다


코드 복사 코드는 다음과 같습니다.Ext.state.Manager.setProvider(
new Ext. state.CookieProvider({
expires: new Date(new Date().getTime() (1000*60*60*24*365)), //1년
}))

관련 라벨:
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿