当用户关闭或刷新浏览器时,我正在尝试更新数据库。这是我的代码:
$(window).bind('unload', function(){ $.ajax({ type: 'get', async: false, url: 'liberaLugar.php?idCurso=2' }); });
任何帮助将不胜感激。提前致谢!
javascript ajax jquery onbeforeunload
ajax ×1
javascript ×1
jquery ×1
onbeforeunload ×1