| <body style="margin-left:0; margin-top:0"> |
| <script> |
| function log(message) |
| { |
| var item = top.document.createElement("li"); |
| item.appendChild(document.createTextNode(message)); |
| top.document.getElementById("log").appendChild(item); |
| } |
| |
| function logMouseEvent(evt) |
| { |
| target = (evt.target) ? evt.target : evt.srcElement; |
| log(evt.type + " on " + target.id); |
| } |
| |
| function doOnMouseOver(evt) |
| { |
| logMouseEvent(evt); |
| document.getElementById("t6").style.backgroundColor = "white"; |
| } |
| |
| function doOnMouseOut(evt) |
| { |
| logMouseEvent(evt); |
| document.getElementById("t6").style.backgroundColor = "gray"; |
| } |
| |
| </script> |
| <div style="height: 50; width: 50; background:violet; top:0;left:0; position:absolute;" id="t6" |
| onMouseOver="doOnMouseOver(event);" |
| onMouseOut="doOnMouseOut(event)">6</div> |
| </body> |