about event handle-function in JavaScript

Posted by T_t on Stack Overflow See other posts from Stack Overflow or by T_t
Published on 2010-05-22T07:47:12Z Indexed on 2010/05/22 7:50 UTC
Read the original article Hit count: 90

Filed under:

hi! In my program,i write like this:

function handleFuc( event ){
  var a = event.pageX;
  var b = event.pageY;
  var tempdiv = document.createElement("div");
  tempdiv.onmouseout = function(){
    var x = event.pageX;    // 1
    var y = event.pageY;    //
  }
}
var div = document.getElementById( "id" );
div.onmouseover = function(){
  handleFuc( event );
}

now,in function handleFuc, how could i distinguish the two "event"? Thanks! :)

© Stack Overflow or respective owner

Related posts about javascript-events