我有一個silverlight應用程序,我想捕獲瀏覽器的關閉事件。所以,我做什麼,我在.aspx頁面中我有這樣的代碼Silverlight 4:OnBeforeUnload
function closeIt() {
return "Any string value here forces a dialog box to \n" +
"appear before closing the window.";
}
window.onbeforeunload = closeIt;
如果這個功能觸發,一個popupwindow會出現,你有2個按鈕確定和取消。
在silverlight或服務器端有沒有辦法獲得用戶點擊的價值?
謝謝
對我以前的問題相同的解決方案http://stackoverflow.com/questions/3456591/silverlight-4-f5-refresh – xscape 2010-08-27 02:27:03