0
我与一起使用onbeforeunload在关闭页面时显示带有文本区域的消息,问题是我正在收到消息但不是文本。我使用的代码是:当关闭页面时使用javascript pompt
window.addEventListener("beforeunload", function(event) {
var response = prompt("Whay this page isn't good for YOU ?", "");
//put the response in log file
//Exit the page
});
我试图很难得到提示,但没有结果。
我试过这个解决方案,但不工作。 – Khalid