Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有弹出窗口,而不是模式。如何通过单击页面的其他部分(不在窗口中)关闭此窗口?
像这样的东西:
function closeWin(e, t) { var el = win.getEl(); if (!(el.dom === t || el.contains(t))) { Ext.getBody().un('click', closeWin); win.close(); } } Ext.getBody().on('click', closeWin);