<!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> <script type="text/javascript"> Ext.onReady(function(){ var panel = new Ext.Panel({ title: 'SAMPLE', height: '400px', width: '500px', html: '<div id="my-div"><input type="button" value="click me" name="but"/></div>' }); panel.render('sub1'); var el = Ext.get("my-div"); var cl = new Ext.util.ClickRepeater(el, { delay:3000, interval: 3002, stopDefault: true, pressClass: 'p1', handler: function rep(){ Ext.Msg.alert("notice", "点击触发了!!"); } }) }); </script> </head> <body> <div id=sub1></div> </body> </html>