File tree Expand file tree Collapse file tree
2-events-and-interfaces/2-events-and-timing-depth
3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave
mouseenter-mouseleave-delegation.view Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5555</textarea >
5656
5757<script >
58- area .onmousedown = function (e ) { this .value += " mousedown\n " ; this .scrollTop = 1e9 ; };
59- area .onmouseup = function (e ) { this .value += " mouseup\n " ; this .scrollTop = 1e9 ; };
60- area .onclick = function (e ) { this .value += " click\n " ; this .scrollTop = 1e9 ; };
58+ area .onmousedown = function (e ) { this .value += " mousedown\n " ; this .scrollTop = this . scrollHeight ; };
59+ area .onmouseup = function (e ) { this .value += " mouseup\n " ; this .scrollTop = this . scrollHeight ; };
60+ area .onclick = function (e ) { this .value += " click\n " ; this .scrollTop = this . scrollHeight ; };
6161 </script >
6262```
6363[ /online]
Original file line number Diff line number Diff line change @@ -2,10 +2,12 @@ table.onmouseover = function(event) {
22 var target = event . target ;
33 target . style . background = 'pink' ;
44 text . value += "mouseover " + target . tagName + "\n" ;
5+ text . scrollTop = text . scrollHeight ;
56} ;
67
78table . onmouseout = function ( event ) {
89 var target = event . target ;
910 target . style . background = '' ;
1011 text . value += "mouseout " + target . tagName + "\n" ;
12+ text . scrollTop = text . scrollHeight ;
1113} ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ function handler(event) {
1010 log . value += event . type + ': ' +
1111 'target=' + str ( event . target ) +
1212 ', relatedTarget=' + str ( event . relatedTarget ) + "\n" ;
13- log . scrollTop = 1e9 ;
13+ log . scrollTop = log . scrollHeight ;
1414
1515 if ( event . type == 'mouseover' ) {
1616 event . target . style . background = 'pink'
You can’t perform that action at this time.
0 commit comments