83510998 2015-08-18
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>
本文实例讲述了jQuery基于闭包实现的显示与隐藏div功能。分享给大家供大家参考,具体如下:。<p>当前手机号码:<span id="oldPhone">$!{user.phone}</span>&