点击其他地方隐藏div
document.onclick = function (event)
{
var e = event || window.event;
var elem = e.srcElement||e.target;
while(elem)
{
if(elem.id == "Divid")
{
return;
}
elem = elem.parentNode;
}
//隐藏div的方法
HiddenDiv();
}