我有一个 silverlight 应用程序,我想捕获浏览器的关闭事件。所以我做了什么,在我的 .aspx 页面中我有这个代码
function closeIt() {
return "Any string value here forces a dialog box to \n" +
"appear before closing the window.";
}
window.onbeforeunload = closeIt;
如果触发此功能,将出现一个弹出窗口,您有 2 个按钮 OK 和 CANCEL。
Silverlight 或服务器端有没有办法获取用户点击的价值?
谢谢