you can use following script as
var confirmOnPageExit = function (e) {
e = e || window.event;
var message = 'Your information will be lost. Are you sure ?';
if (e) {
e.returnValue = message;
}
return message;
};
window.onbeforeunload = confirmOnPageExit;
DeActivate on Submit button
<input type="submit" onclick="window.onbeforeunload = null; " value="Save" />
For the new changes in input fields
$('input').blur(function () {
window.onbeforeunload = confirmOnPageExit;
});