Destroy the object when the WEB page is left
window.onbeforeunload=function() { return "你确定要退出本系统吗?"; } window.onunload=function(){ if(my&& my.sessionId){ Ext.Ajax.request({ url : './userSession.do?method=logout', method : 'POST', params : { sessionId: my.sessionId } }); } }