📅  最后修改于: 2022-03-11 15:03:12.648000             🧑  作者: Mango
$(document).on("click", function (event) {
// If the target is not the container or a child of the container, then process
// the click event for outside of the container.
if ($(event.target).closest("#container").length === 0) {
console.log("You clicked outside of the container element");
}
});