📅  最后修改于: 2022-03-11 15:03:06.439000             🧑  作者: Mango
// There are numerous reasons why disabling the back button will not really work. Your best bet is to warn the user:
window.onbeforeunload = function() { return "Your work will be lost."; };