js搜索显示搜索结果div,点击除了搜索框和搜索结果div时,隐藏
jQuery(document).bind('click',function(e){
  var target = jQuery(e.target);
  if(target.closest(".seaVal").length!=1&&target.closest(".seaList").length!=1)
  {
   var showcityaz = document.getElementById("showcityaz");
   if($(".seaList").show()){
    $(".seaList").hide();
   }
  }
 }
 );
<div class="seaVal"><input id="subjectName" name="subjectName" type="text" onkeyup="doQuerySubject(this)" onfocus="doQuerySubject(this)" /></div>
<div class="seaList"></div>
相关推荐
  89510194    2019-12-31  
   开心就好    2019-08-27  
   xiaohuli    2019-06-29  
   libowen0    2018-06-04  
   hhhkhhh    2017-07-20  
   杉林的HelloWord    2015-11-24  
   dangzhangjing    2019-06-27  
   语帆    2015-04-15  
   小肖    2014-07-16  
   teresalxm    2014-04-30  
   CoderChang    2014-04-30  
   hjfbluesky    2014-03-05  
   83443560    2013-09-06  
   统一开发环境UDE    2013-02-05  
   JeWangZhe    2012-08-30  
 