$(function(){ $(document).bind("click",function(e) { var t = $(e.target); //#in,.dd 为指定的区域,#box为想消失的div if(!t.is('#in') && !t.is("#box") && !t.is(".dd")) { if ($('#box').is(':visible') ) { $('#box').hide(); } } }) })