//检查两个DIV是否有接触 function checkTouch(o1,o2){ p1=getObjPos(o1); //得到左上角的绝对坐标 p2=getObjPos(o2); x1=p1.x;y1=p1.y; x2=p2.x;y2=p2.y; w1=o1.offsetWidth; h1=o1.offsetHeight; w2=o2.offsetWidth; h2=o2.offsetHeight; return ((x1-x2<=0)&&(x2-x1<w1)||(x1-x2>=0)&&(x1-x2<w2))&& ((y1-y2<=0)&&(y2-y1<h1)||(y1-y2>=0)&&(y1-y2<h2)); };