if(typeof(HTMLElement)!="undefined")
{
  HTMLElement.prototype.contains = function(obj)
  {
    while(obj!=null && typeof(obj.tagName)!="undefind")
    {if(obj==this) return true; obj=obj.parentNode;} return false;
  };
}
可以判断鼠标是否在某个控件的范围之内