<html>
<head>
<script>
if(typeof(HTMLElement)!="undefined")
HTMLElement.prototype.contains=function(obj)
{
if(obj==this)return true;
while(obj=obj.parentNode)if(obj==this)return true;
return false;
}
document.onmousedown=function(e)
{
e=e||event;
if(!dd.contains(e.target||e.srcElement))
dd.style.display="none";
}
</script>
</head>
<body>
<div id="dd" style="border:solid 1px red; backgroun-color:#ccc">
asdfasdfad
</div>
</body>
</html>
<head>
<script>
if(typeof(HTMLElement)!="undefined")
HTMLElement.prototype.contains=function(obj)
{
if(obj==this)return true;
while(obj=obj.parentNode)if(obj==this)return true;
return false;
}
document.onmousedown=function(e)
{
e=e||event;
if(!dd.contains(e.target||e.srcElement))
dd.style.display="none";
}
</script>
</head>
<body>
<div id="dd" style="border:solid 1px red; backgroun-color:#ccc">
asdfasdfad
</div>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货