使用以下功能可以检测用户按下刷新按钮或关闭按钮的按钮?如果没有另外的方法?
$(window).bind('beforeunload', function(event) { return 'pls save ur work'; });
html javascript
html ×1
javascript ×1