-1
イベントアンロードでページの更新を停止するにはどうすればよいですか?あなたは文字列を返すと、このように、直接結合する必要がイベント「アンロード」のページを更新しないでください
$(window).unload(function(){
if(confirm('Do you really want to exit the survey without completing it? Your data will be deleted.')){
// This does not currently work in the method
// onbeforeunload which took Nick Craver
$.ajax({
url: 'db_sotr_file.anket_my.ajax_remove_anketa',
dataType: 'html',
success: function(){
$.cookie('refresh_page', null);
$.cookie('hashid', null);
$.cookie('sessionid', null);
}
}); // This moment is the most important
// page the refresh
return true;
}
// don't refresh the page
return false;
});
*完全に*質問を変更したときには必ずコメントしてください。 –