简单示例代码:

<body> 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> 
<script type="text/javascript"> 
$(function(){ 
$(document).bind("click",function(e){ 
var target = $(e.target); 
if(target.closest(".pop").length == 0){ 
$(".pop").hide(); 
} 
}) 
}) 
</script> 
<div class="pop"></div> 
点击空白的地方指定div 隐藏消失了 
</body> 
</html> 

更多:http://www.jb51.net/article/30776.htm

 

相关文章:

  • 2022-12-23
  • 2021-09-15
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-20
  • 2022-12-23
猜你喜欢
  • 2021-11-02
  • 2021-12-23
  • 2021-11-06
  • 2022-12-23
  • 2022-02-12
  • 2021-12-05
  • 2022-12-23
相关资源
相似解决方案