summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/mouseleave.html
blob: ac331fd96f7420e59832cf4f7ed1628eb9c1d0ad (plain)
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
<html>
 <head>
  <style>
   body {
    margin: 0px;
    padding: 0px;
   }
   #mybox {
    padding: 20px;
    margin: 0px;
    border: 1px solid #000;
   }
   #mystatus {
    border: 1px solid #000;
    padding: 20px;
    margin: 0px;
   }
  </style>
  <script>
   var state = '';
   var hasLeave = false;
   function load() {
     state = 'initial';
     document.getElementById("mystatus").innerHTML = state;
     document.title = "onload";
   }
   function enter() {
     state += ',entered';
     document.getElementById("mystatus").innerHTML = state;
     document.title = "entered";
   }
   function leave() {
     hasLeave = true;
     state += ',left';
     document.getElementById("mystatus").innerHTML = state;
     document.title = "left";
   }
   function done() {
     state += ',done';
     document.getElementById("mystatus").innerHTML = state;
     document.title = hasLeave ? "with mouseleave" : "without mouseleave";
   }
  </script>
 </head>
 <body onload="load()">
  <div id="mybox" onmouseover="enter()" onmouseout="leave()"></div>
  <div id="mystatus"></div>
 </body>
</html>