if (!isClose) { var agree; agree = confirm('Are you sure to close the window'); if (agree) { return true; } else { return false; } }
beforeunload
if (!isClose) { if (confirm('Are you sure to close the window?')) { //close code here return true; } else { return false; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)