监听页面关闭: window.onbeforeunload = function() { //鼠标相对于用户屏幕的水平位置 - 窗口左上角相对于屏幕左上角的水平位置 = 鼠标在当前窗口上的水平位置 var n = window.event.screenX - window.screenLeft; //鼠标在当前窗口内时,n<m,b为false:鼠标在当前窗口外时,n>m,b为true.20这个值是指关闭按钮的宽度 var b = n > document.documentElement.
为了解决ninx反向代理,添加路由,但最终react的route还是不认识,研究了半天做个记录: document.addEventListener("keydown",function(event){ if (event.code === 'F5') { event.preventDefault(); console.info(event.code, event); var pathname = location.pathname; var newUrl = null; if (pa