-3

I have coding for onmousemove event working well in Firefox and IE but not in Chrome:

         var mouse;
         function storeMouse(e) {
             if (!e) e = window.event;
             mouse = { clientX: e.clientX, clientX: e.clientY };
         }

         function test(e) {
             alert(mouse.clientX);
             if (mouse.clientX < 150) {
                 var agree = confirm("Are you sure to leave this page");
                 if (!agree) {
                     return false;
                 }
                 else {

                 }
             }
         }

4

1 回答 1

2

第 4 行的问题:重复的 mouse.clientX

于 2012-04-09T06:34:00.673 回答