Extjs 页面暂停 类似Js中setTimeout()方法


   
  //Session过期,返回登录页面
  
function sessionTimeOut() {

check_login = function () {
Ext.Ajax.request({
url: './inc/session.asp',
success: function (response, options) {
var responseArray = jsonDecode(response.responseText);
if (responseArray.success == true) {
Ext.MessageBox.show({
title: '会话超时',
msg: '您的会话已由于超时而过期,请您重新登录!',
buttons: Ext.MessageBox.OK,
fn: showResult,
icon: Ext.MessageBox.WARNING
});
}
}
});
};
check_login();
setTimeout(showResult, 3000); //这个方法在这里好像不能用
}

想得到一个使页面暂停三秒以后 跳转到下一个页面的方法

ExtJS

信春哥的永生 10 years, 9 months ago
   
  var task = new Ext.util.DelayedTask(function(){
  
alert(Ext.getDom('myInputField').value.length);
});

// Wait 500ms before calling our function. If the user presses another key
// during that 500ms, it will be cancelled and we'll wait another 500ms.
Ext.get('myInputField').on('keypress', function() {
task.delay(500);
});

可以查询ExtJS的官方API文档哦~ 里面有使用说明

vekyhe answered 10 years, 9 months ago

Your Answer