| JavaScript Document (8) Events (8) ExtJS (5) Strings (3) |
Catch mouse move events in Internet Explorer and Netscape
Question: How can I catch mouse move events both in Internet Explorer and Netscape? I need to keep track of the current position (in pixel coordinates) of the mouse on the document.Answer: You need to see if IE or Netscape is running by checking for document.all or document.layers. Note that the code to access the event coordinates for Netscape 6 is different than for Netscae 4 and 5. Even the event handler registration is different for each browser.The example works for Netscape 4,5,6 and IE 4,5,6.
Comments:
|