// 判断鼠标是不是在某个元素中
function isInRect(event,obj){
event =
event||window.event;
var mouseClickPostion =
[event.clientX+document.body.scrollLeft,event.clientY+document.body.scrollTop],
listMemuPostion = [obj.offsetLeft, obj.offsetTop],
isInRect =
((mouseClickPostion[0]>=listMemuPostion[0]) &&
mouseClickPostion[1]>=listMemuPostion[1] && mouseClickPostion[0]-
listMemuPostion[0]<=obj.offsetWidth &&
mouseClickPostion[1]-listMemuPostion[1]<=obj.offsetHeight);
return isInRect;
}