在表单外部单击时,我使用以下代码隐藏div和ovelay div。
下面的javascript是:
$(document).mouseup(function (e)
{
var container = $("#feedbackform");
var overlay = $("#overlay");
if (!container.is(e.target) // if the target of the click isn't the container...
&& container.has(e.target).len