<!DOCTYPE html>
<html>
<head>
    <title>ExtJs</title>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  		<link rel="stylesheet" type="text/css" href="ExtJs/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all.css">
      <script type="text/javascript" src="ExtJs/ext-all.js"></script>
      <script type="text/javascript" src="ExtJs/bootstrap.js"></script>
      <script type="text/javascript" src="ExtJs/packages/ext-theme-crisp/build/ext-theme-crisp.js"></script>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function() {
  var task = {
    run:function(){
      Ext.Msg.alert("notice", "线程已经运行,我将每次运行重复5次,但10秒后我将停止!");
    },
    interval: 1000,
    repeat: 5,
    duration: 10000
  };
  var task1 = new Ext.util.TaskRunner();
  task1.start(task);
  //task1.stopAll();
});
</script>
</body>
</html>

  ExtJs之Ext.util.TaskRunner-LMLPHP

04-21 04:12