我想确定如何通过silverlight 4.0甚至在服务器端过滤F5,刷新按钮,X和关闭浏览器.
谢谢
编辑:
我今天,2011年7月28日在我的问题中添加了赏金.我之前的解决方案/答案已不再适用于IE 9.
window.onunload = function (e) {
// Firefox || IE
e = e || window.event;
var y = e.pageY || e.clientY;
if (y < 0) {
alert("close");
}
else {
alert("refresh");
}
}
Run Code Online (Sandbox Code Playgroud)
当用户点击F5,刷新,X和关闭按钮时,不应出现消息框.以防万一解决方案是onbeforeunload.
谢谢你的帮助!