1.限制对象可以是 div 或者from
2.添加calss =stopProhide
3.需要添加jquery 类库
示例:
$("#form_Query").click(function (e) {
var e = e || window.event;
var elem = e.target || e.srcElement;
var flag = false;
while (elem) {
if (elem.className && elem.className.indexOf('stopProhide') > -1) {
flag = true;
}
elem = elem.parentNode;
}
if (!flag) {
$("#deptBackGround").fadeOut("fast");
}
});