按Esc按钮关闭layer弹窗

//按Esc关闭弹出框

$(document).ready(function () { }).keydown(

   function (e) {

    if (e.which === 27) {

      layer.closeAll();

       }

         });

原文地址:https://www.cnblogs.com/Tpf386/p/8289282.html