1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!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">
function hello() {
  alert('hello');
}
Ext.onReady(function(){
  function hello3(){
    alert('hello3');
    return true;
  }
  function hello4(){
    alert('hello4');
    return false;
  }
 
  var button = Ext.get('btn3');
  button.addListener('click', hello3);
  button.addListener('click', hello4);
})
</script>
<body>
<div id='id01' >hello, this word.</div>
<input type="button" id="btn" value="DHTML CLICK" οnclick="hello()">
<input type="button" id="btn12" value="DOM CLICK">
<input type="button" id="btn3" value="ExtJs CLICK">
 
<script language="JavaScript">
function hello1(){
  alert('hello1');
}
function hello2(){
  alert('hello2');
}
var button = document.getElementById('btn12');
console.log(button);
button.addEventListener('click', hello1, false);
button.addEventListener('click', hello2, false);
</script>
</body>
</html>

  ExtJs之DHTML,DOM,EXTJS的事件绑定区别

相关文章:

  • 2022-12-23
  • 2021-11-05
  • 2021-05-22
  • 2021-10-13
  • 2021-08-05
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-30
  • 2021-07-07
  • 2021-10-17
  • 2021-09-13
  • 2022-12-23
  • 2021-06-26
相关资源
相似解决方案