Tâm trạng : Posts : 123Points : 16166Thanked : 45Tham gia : 03/04/2013
TS Kenz
Tâm trạng : Posts : 123Points : 16166Thanked : 45Tham gia : 03/04/2013
Tiêu đề: [Code] Hỏi trước khi thoát ?
Demo :
Vào Admin Panel -> Modules -> JavaScript Codes Management Tạo mới : Title : Logout Chọn : In all pages
Code:
$(document).ready(function() { var x = document.getElementById('logout'); $(x).click(function(cLogout) { var y = confirm("Are you sure you want to logout?"); if (y == true) { return true; } else { cLogout.preventDefault(); } }); });