home.html文件<body><div><button id=‘btn1‘>按钮1</button><button >按钮2</button></div> </body> <script>const bindEventListener = function (type) {const historyEvent = history[type];return function () {const newEvent = historyEvent.apply(this, arguments);const e = new Event(type);e.arguments = arguments;window.dispatchEvent(e);return newEvent;};};history.pushState = bindEventListener(‘pushState‘...