this is my code:
<html>
<body>
<form>
.....
<button type="submit">Submit</button>
</form>
</body>
<script type="text/javascript">
window.onbeforeunload = confirmExit;
function confirmExit()
{
return "...";
}
</script>
</html>
I want to confirm only when I click the browser X not when I submit the form. What change? Is possible?