点击页面任意地方,隐藏层

<script language="javascript">
document.onclick = function(e){
 e = e || window.event;
 var target = e.srcElement || e.target;
 if(target.tagName.toLowerCase()!='a'){ 
  document.getElementById('more_list').style.display = 'none';
 }
}
</script>

Leave a Reply

Your email address will not be published.